
svyglm(formula, design, subset=NULL, ...)
svrepglm(formula, design, subset=NULL, ..., rho=NULL,
return.replicates=FALSE, na.action)
## S3 method for class 'svyglm':
summary(object, correlation = FALSE, ...)
svydesign
or svrepdesign
. Must contain all variables
in the formulaglm
or
summary.glm
svyglm
objectsvyglm
.svyglm
, standard errors for cluster-sampled designs are computed using a
linearisation estimate (in the absence of strata this is equivalent to
the Huber/White sandwich formula in GEEs). Most of these computations
are done in svyCprod
. In svrepglm
, replicate
weight methods are used.There is no anova
method for svyglm
as the models are not
fitted by maximum likelihood. The function regTermTest
may
be useful for testing sets of regression terms.
svydesign
,
svrepdesign
,as.svrepdesign
, glm
,
svyCprod
, svy.varcoef
,regTermTest
data(api)
glm(api00~ell+meals+mobility, data=apipop)
dstrat<-svydesign(id=~1,strata=~stype, weights=~pw, data=apistrat, fpc=~fpc)
dclus2<-svydesign(id=~dnum+snum, weights=~pw, data=apiclus2)
rstrat<-as.svrepdesign(dstrat)
rclus2<-as.svrepdesign(dclus2)
summary(svyglm(api00~ell+meals+mobility, design=dstrat))
summary(svyglm(api00~ell+meals+mobility, design=dclus2))
summary(svrepglm(api00~ell+meals+mobility, design=rstrat))
summary(svrepglm(api00~ell+meals+mobility, design=rclus2))
## use quasibinomial, quasipoisson to avoid warning messages
summary(svyglm(sch.wide~ell+meals+mobility, design=dstrat, family=quasibinomial()))
Run the code above in your browser using DataLab