Description Usage Arguments Value Author(s) References See Also Examples
Solves GEEs in an extensible way, with a C++ engine. $Header: /udd/stvjc/VCROOT/yags/man/yags.Rd,v 5.1 2007/12/11 16:57:19 stvjc Exp $
1 2 3 4 |
formula |
GLM formula |
id |
numeric vector of cluster discriminators; data assumed sorted by this vector |
cor.met |
correlation metameter: vector of observation times for longitudinal data, matrix of coordinates for other designs. If unstructured working correlation, this must have nonnegative integer values with zero origin. |
family |
GLM family – can use default (gaussian – linear link, constant variance), poisson() (log link, variance = mean), Gamma() (reciprocal link, variance = mu*mu), binomial (logit link, binomial variance), quasi(link=log, var=mu^2), quasi(link = "identity", var=mu), or quasi(link=:identity:, var=mu^2) |
corstruct |
string describing working correlation model. For Wang and Carey 2004 JASA article structure, use "UQ.fom" Other options are "independence", "exchangeable", "UJ.fom", "ar1", "unstructured". |
control |
list of control parameters, see yags.control() |
weights |
vector of weights |
betainit |
initial value of regression parameters |
alphainit |
initial value of working correlation model parameters |
data |
data source for model fit |
subset |
expression selecting a subset for fitting |
allcrit |
logical – if TRUE, compute all criteria for candidate models |
lhetfam |
the glm family object defining the candidate model expressing linear heteroskedasticity |
qhetfam |
the glm family object defining the candidate model expressing quadratic heteroskedasticity |
icritalp |
numeric initial value of alpha parameter for candidate model fits for criteria computation |
critar1tag |
string defining the corstruct to be used for candidate model fits |
see yags.object
VJ Carey, stvjc@gauss.med.harvard.edu
Liang KY, Zeger SL. Biometrika 1986
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 | #
# trivial demo
#
library(methods)
data(stackloss)
Y1 <- yags(stack.loss~Air.Flow,id=1:21, data=stackloss)
#
# spruce examples for gaussian family and various corstructs
#
data(Spruce)
SPRind <- yags(y~Time+treated,id=Subject,data=Spruce)
SPRexc <- yags(y~Time+treated,id=Subject,data=Spruce,
corstr="exchangeable", alphainit=0.)
# unstructured:
SPRuns <- yags(y~Time+treated,id=Subject,data=Spruce,
corstr="unstructured", alphainit=rep(.1,45),
cor.met=as.double(rep(0:9,79)))
# U_J of Wang and Carey JASA 2004
SPRUJ <- yags(y~Time+treated,id=Subject,data=Spruce,
corstr="UJ.fom", alphainit=.1,
cor.met=as.double(rep(0:9,79)))
#
# some criteria of adequacy over ranges of models
SPRUJ <- yags(y~Time+treated,id=Subject,data=Spruce,
corstr="ar1", alphainit=.1,
cor.met=as.double(rep(0:9,79)), allcrit=TRUE,
lhetfam=quasi(variance="mu"), qhetfam=quasi(variance="mu^2"))
sort(SPRUJ@m2LG)
sort(SPRUJ@del1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.