Learn R Programming

guideR (version 0.8.1)

svyoneway: Test for Equal Means for survey design object

Description

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

Usage

svyoneway(formula, design, ...)

Value

an object of class "htest"

Arguments

formula

a formula of the form lhs ~ rhs where lhs gives the sample values and rhs the corresponding groups

design

a survey design object

...

additional parameters passed to survey::regTermTest()

See Also

stats::oneway.test() for classic data frames

Examples

Run this code
if (FALSE) { # rlang::is_installed(c("survey", "srvyr"))
svyoneway(
  Petal.Length ~ Species,
  design = srvyr::as_survey(iris)
)
}

Run the code above in your browser using DataLab