Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

svyttest

Design-based t-test


Description

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)-1 for the one-sample test and degf(design)-2 for the two-sample case.

Usage

svyttest(formula, design,  ...)

Arguments

formula

Formula, outcome~group for two-sample, outcome~0 or outcome~1 for one-sample

design

survey design object

...

for methods

Value

Object of class htest

See Also

Examples

data(api)
dclus2<-svydesign(id=~dnum+snum, fpc=~fpc1+fpc2, data=apiclus2)
tt<-svyttest(enroll~comp.imp, dclus2)
tt
confint(tt, level=0.9)

svyttest(I(api00-api99)~0, dclus2)

survey

Analysis of Complex Survey Samples

v4.0
GPL-2 | GPL-3
Authors
Thomas Lumley
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.