MyNixOS website logo
Description

Cross-Validated Predictions from GEE.

Calculates predictions from generalized estimating equations and internally cross-validates them using the logarithmic, quadratic and spherical proper scoring rules; Kung-Yee Liang and Scott L. Zeger (1986) <doi:10.1093/biomet/73.1.13>.

cvGEE: Cross-Validated Predictions from GEE

Travis-CI Build Status CRAN status Download counter Rdoc rpackages.io rank

Description

cvGE&/strong; calculates cross-validated versions of the logarithmic, quadratic and spherical scoring rules based on generalized estimating equations.

The package presumes that the GEE has been solved using the geeglm() function of the geepack.

  • For family = gaussian() only the quadratic rule is available calculated as the squared prediction error; lower values indicate a better predictive ability.

  • For family = binomial() and dichotomous outcome data the probabilities for the two categories are calculated from the Bernoulli probability mass function. For family = binomial() and binomial data the probabilities for each possible response are calculated from a beta-binomial distribution with variance set equal to the variance from the corresponding quasi-likelihood behind the GEE. Likewise for family = poisson() the probabilities for the number of events up to a particular maximum (set using the max_count argument) are calculated using the negative binomial distribution with variance set equal to the variance from the corresponding quasi-likelihood behind the GEE. For these families all three scoring rules are available, with higher values in each rule indicating better predictive ability.

Basic Use

We compare a linear and a nonlinear GEE for the dichotomized version of the serum bilirubin biomarker from the PBC dataset:

library("geepack")
library("cvGEE")
library("splines")
library("lattice")

pbc2$serBilirD <- as.numeric(pbc2$serBilir > 1.2)

gm1 <- geeglm(serBilirD ~ year * drug, 
              family = binomial(), data = pbc2, id = id, 
              corstr = "exchangeable")

gm2 <- geeglm(serBilirD ~ ns(year, 3, Boundary.knots = c(0, 10)) * drug, 
              family = binomial(), data = pbc2, id = id, 
              corstr = "exchangeable")

plot_data <- cv_gee(gm1, return_data = TRUE)
plot_data$linear <- plot_data$.score
plot_data$non_linear <- unlist(cv_gee(gm2))

xyplot(linear + non_linear ~ year | .rule, data = plot_data, 
       type = "smooth", auto.key = TRUE, layout = c(3, 1),
       scales = list(y = list(relation = "free")),
       xlab = "Follow-up time (years)", ylab = "Scoring Rules")

Installation

The development version of the package can be installed from GitHub using the devtools package:

devtools::install_github("drizopoulos/cvGEE")

and with vignettes

devtools::install_github("drizopoulos/cvGEE", build_vignettes = TRUE)
Metadata

Version

0.3-0

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows