tests/svyivreg-var.R

library(survey)
data(api)
dstrat<-svydesign(id=~1,strata=~stype, weights=~pw, data=apistrat, fpc=~fpc)
a<-summary(svyglm(api00~ell+meals+mobility, design=dstrat))
b<- summary(svyivreg(api00~ell+meals+mobility, design=dstrat))
stopifnot(isTRUE(all.equal(a$cov.scaled, b$vcov)))
bschneidr/fastsurvey documentation built on March 13, 2024, 11:12 a.m.