Last chance! 50% off unlimited learning
Sale ends in
## S3 method for class 'survey.design':
svyglm(formula, design, subset=NULL, ...)
## S3 method for class 'svyrep.design':
svyglm(formula, design, subset=NULL, ..., rho=NULL,
return.replicates=FALSE, na.action)
## S3 method for class 'svyglm':
summary(object, correlation = FALSE, df.resid=NULL, ...)
svydesign
or svrepdesign
. Must contain all variables
in the formulaglm
or
summary.glm
rho
and 2-rho
svyglm
objectsvyglm
.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.If df.resid
is not specified the df for the null model is
computed by degf
and the residual df computed by
subtraction. It's not that these are particularly good approximations
in a regression model but they are relatively standard. To get tests
based on a Normal distribution use df.resid=Inf
.
svydesign
,
svrepdesign
,as.svrepdesign
, glm
,
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(svyglm(api00~ell+meals+mobility, design=rstrat))
summary(svyglm(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