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)))

Try the survey package in your browser

Any scripts or data that you put into this service are public.

survey documentation built on May 3, 2023, 9:12 a.m.