This function allows to compare several means using survey::svyglm(). More
precisely, this is a wrapper for survey::regTermTest(m, "group") where
m <- survey::svyglm(x ~ group, design).
Arguments
- formula
a formula of the form
lhs ~ rhswherelhsgives the sample values andrhsthe corresponding groups- design
a survey design object
- ...
additional parameters passed to
survey::regTermTest()
See also
stats::oneway.test() for classic data frames
Examples
svyoneway(
Petal.Length ~ Species,
design = srvyr::as_survey(iris)
)
#>
#> Design-based one-way analysis of means
#>
#> data: Petal.Length and Species
#> F = 1868.8, df = 2, ddf = 147, p-value < 2.2e-16
#>