svyolr | R Documentation |
Fits cumulative link models: proportional odds, probit, complementary log-log, and cauchit.
svyolr(formula, design, ...)
## S3 method for class 'survey.design2'
svyolr(formula, design, start, subset=NULL,...,
na.action = na.omit,method = c("logistic", "probit", "cloglog", "cauchit"))
## S3 method for class 'svyrep.design'
svyolr(formula,design,subset=NULL,...,return.replicates=FALSE,
multicore=getOption("survey.multicore"))
## S3 method for class 'svyolr'
predict(object, newdata, type = c("class", "probs"), ...)
formula |
Formula: the response must be a factor with at least three levels |
design |
survey design object |
subset |
subset of the design to use; |
... |
dots |
start |
Optional starting values for optimization |
na.action |
handling of missing values |
multicore |
Use |
method |
Link function |
return.replicates |
return the individual replicate-weight estimates |
object |
object of class |
newdata |
new data for predictions |
type |
return vector of most likely class or matrix of probabilities |
An object of class svyolr
The code is based closely on polr() from the MASS package of Venables and Ripley.
svyglm
, regTermTest
data(api)
dclus1<-svydesign(id=~dnum, weights=~pw, data=apiclus1, fpc=~fpc)
dclus1<-update(dclus1, mealcat=cut(meals,c(0,25,50,75,100)))
m<-svyolr(mealcat~avg.ed+mobility+stype, design=dclus1)
m
## Use regTermTest for testing multiple parameters
regTermTest(m, ~avg.ed+stype, method="LRT")
## predictions
summary(predict(m, newdata=apiclus2))
summary(predict(m, newdata=apiclus2, type="probs"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.