Learn R Programming

geeni (version 0.99.3)

pargee: Parallel GEE solver

Description

A parallelized, out-of-memory based GEE solver

Usage

## S3 method for class 'gdManager':
pargee(gd, family, binit, maxit=20, 
            tol=1e-06, sandwich=TRUE, ...)

Arguments

family
A GLM stats family instance, e.g., gaussian. See ?family for details.
binit
Initial values for the regression parameter vector.
maxit
Maximum number of iterations allowed.
tol
Convergence criterion. The absolute value of the incremental change in parameter estimates is measured in each iteration step. Iterations will stop when the largest of these changes is smaller than tol.
sandwich
Logical indicating if the robust variance should be computed.
...
Arguments passed to other methods.

Value

  • A list with two named elements: `coefficients` and `robust.variance`.

Details

Preliminary demonstration, mildly validated on orthodontic data for gaussian case and respiratory data for binomal case.

Examples

Run this code
## Create a 'groupedData' object from 'Orthondont' data set:
library(nlme)
  orthGD <-
       groupedData(distance ~ age | Subject,
                   data = as.data.frame(Orthodont),
                   FUN = mean,
                   outer = ~ Sex,
                   labels = list(x = "Age",
                     y = "Distance from pituitary to pterygomaxillary fissure"),
                   units = list( x = "(yr)", y = "(mm)"))
dim(orthGD)

## Create a 'gdManager' that points to the ff files in tempdir():
orthMgr <- groupedData2ff(gd=orthGD, gcol=3, prefix=tempfile())

## In the ff file 'Sex' is coded as `1` for male and `2` for female. 
## We adjust the coding to `0` and `1`.
numdat(orthMgr)[,"Sex"] <- numdat(orthMgr)[,"Sex"] - 1
 
## Call the GEE solver:
res <- pargee(orthMgr, gaussian, c(0, 0, 0))

## Coefficients and standard errors:
round(res$coefficients, 4)
round(sqrt(diag(res$robust.variance)), 4)

## Compare results with those from geeglm() from the geepack package:
library(geepack)
geeglm <- geeglm(distance ~ age + Sex, data=orthGD, id=Subject)
round(summary(geeglm)$coefficients, 4)

Run the code above in your browser using DataLab