ordreg | R Documentation |
Maximum-likelihood estimation of a model for which the response is ordinal
ordreg(
formula,
data,
weights,
subset,
na.action,
offset,
contrasts = NULL,
link = c("probit", "logit", "cloglog"),
start = NULL,
opt = c("bfgs", "nr", "newton"),
maxit = 100,
trace = 0,
check_gradient = FALSE,
...
)
## S3 method for class 'ordreg'
fitted(object, ..., type = c("outcome", "probabilities"))
formula |
a symbolic description of the model |
data |
a data frame |
subset , weights , na.action , offset , contrasts |
see |
link |
one of |
start |
a vector of starting values, |
opt |
optimization method |
maxit |
maximum number of iterations |
trace |
printing of intermediate result |
check_gradient |
if |
... |
further arguments |
object |
a |
type |
one of |
an object of class micsr
, see micsr::micsr
for further
details.
mod1 <- ordreg(factor(dindx) ~ rhs1 + catchup, fin_reform, link = "logit")
library(survival)
ud <- transform(unemp_duration, years = floor(duration / 365))
ud <- transform(ud, years = ifelse(years == 6, 5, years))
mod2 <- ordreg(Surv(years, censored == "no") ~ gender + age + log(1 + wage), ud,
link = "cloglog", opt = "bfgs")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.