The geekin function fits generalized estimating equations but where the correlation structure is given as linear function of (scaled) fixed correlation structures.

1 2 |

`formula` |
See corresponding documentation to |

`family` |
See corresponding documentation to |

`data` |
See corresponding documentation to |

`weights` |
See corresponding documentation to |

`subset` |
See corresponding documentation to |

`id` |
a vector which identifies the clusters. The length of |

`na.action` |
See corresponding documentation to |

`control` |
See corresponding documentation to |

`varlist` |
a list containing one or more matrix or bdsmatrix objects that represent the correlation structures |

`...` |
further arguments passed to or from other methods. |

The geekin function is essentially a wrapper function to `geeglm`

.
Through the varlist argument, it allows for correlation structures of the
form

R = sum_i=1^k alpha_i R_i

where alpha_i are(nuisance) scale parameters that are used to scale the off-diagonal elements of the individual correlation matrices, R_i.

Returns an object of type `geeglm`

.

Claus Ekstrom claus@rprimer.dk

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | ```
# Get dataset
library(kinship2)
library(mvtnorm)
data(minnbreast)
breastpeda <- with(minnbreast[order(minnbreast$famid), ], pedigree(id,
fatherid, motherid, sex,
status=(cancer& !is.na(cancer)), affected=proband,
famid=famid))
set.seed(10)
nfam <- 6
breastped <- breastpeda[1:nfam]
# Simulate a response
# Make dataset for lme4
df <- lapply(1:nfam, function(xx) {
as.data.frame(breastped[xx])
})
mydata <- do.call(rbind, df)
mydata$famid <- rep(1:nfam, times=unlist(lapply(df, nrow)))
y <- lapply(1:nfam, function(xx) {
x <- breastped[xx]
rmvtnorm.pedigree(1, x, h2=0.3, c2=0)
})
yy <- unlist(y)
library(geepack)
geekin(yy ~ 1, id=mydata$famid, varlist=list(2*kinship(breastped)))
# lmekin(yy ~ 1 + (1|id), data=mydata, varlist=list(2*kinship(breastped)),method="REML")
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.