svyclm: Wrapper for Ordinal Logistic Regression (cumulative link...

View source: R/svymisc.R

svyclmR Documentation

Wrapper for Ordinal Logistic Regression (cumulative link model) for Replicate Weights

Description

Uses withReplicates and clm to generate coefficients, and standards errors for ordinal logistic regressions using replicate weights

Usage

svyclm(formula, design, subset, ..., scale.weights = FALSE)

Arguments

formula

Model formula

design

Survey design from svrepdesign

subset

Expression to select a subpopulation

...

Other arugments passed to clm

scale.weights

Indicate whether to rescale weights (defaults to false)

References

Lumley, Thomas. Complex Surveys: A Guide to Analisys Using R. Hoboken, NJ: Wiley, 2010. Print.

See Also

withReplicates clm

Examples

library(survey)
data(api)
d <- svydesign(id=~dnum, weights=~pw, data=apiclus1, fpc=~fpc)
dwr <- as.svrepdesign(d, type = "bootstrap", replicates = 100)
mod <- svyclm(stype ~ ell + mobility, dwr)
mod
confint(mod)
library(broom)
tidy(mod)
tidy(mod, exponentiate = TRUE, conf.int = TRUE)

carlganz/svrepmisc documentation built on July 4, 2023, 6:56 p.m.