One-sample or two-sample t-test. This function is a wrapper for
svymean
in the one-sample case and for
svyglm
in the two-sample case. Degrees of freedom are
degf(design)
for the one-sample test and degf(design)-1
for the two-sample case.
svyttest(formula, design, ...)
Formula, outcome~group
for two-sample,
outcome~0
or outcome~1
for one-sample
survey design object
for methods
Object of class htest
# NOT RUN {
data(api)
dclus2<-svydesign(id=~dnum+snum, fpc=~fpc1+fpc2, data=apiclus2)
svyttest(enroll~comp.imp, dclus2)
svyttest(I(api00-api99)~0, dclus2)
# }
Run the code above in your browser using DataLab