ologit.reg: Fit an ordered Logit model.

Description Usage Arguments Details Value Author(s) See Also

View source: R/WrapperFuncs.R

Description

Wrapper function for oglmx to estimate an ordered Logit model.

Usage

1
2
3
ologit.reg(formula, data, start = NULL, weights=NULL, beta = NULL, threshparam = NULL,
           analhessian = TRUE, na.action, savemodelframe = FALSE, robust = FALSE, 
           Force = FALSE)

Arguments

formula

an object of class formula: a symbolic description of the model used to explain the mean of the latent variable. The response variable should be a numeric vector or factor variable such that the numerical assignments for the levels of the factor have ordinal meaning.

data

a data frame containing the variables in the model.

start

either NULL or a numeric vector specifying start values for each of the estimated parameters, passed to the maximisation routine.

weights

either NULL or a numeric vector of length equal to the number of rows in the data frame. Used to apply weighted maximum likelihood estimation.

beta

NULL or numeric vector. Used to prespecify elements of the parameter vector for the equation of the mean of the latent variable. Vector should be of length one or of length equal to the number of explanatory variables in the mean equation. NA should be entered for elements of the vector to be estimated.

threshparam

numeric vector. Used to prespecify the threshold parameters of the model. Vector should be of length equal to the number of outcomes minus one. NA should be entered for threshold parameters to be estimated by the model.

analhessian

logical. Indicates whether the analytic Hessian should be calculated and used, default is TRUE, if set to FALSE a finite-difference approximation of the Hessian is used.

na.action

a function which indicates what should happen when the data contain NAs. The default is set by the na.action setting of options, and is na.fail if that is unset. The factory-fresh default is na.omit. Another possible value is NULL, no action. Value na.exclude can be useful.

savemodelframe

logical. Indicates whether the model frame(s) should be saved for future use. Default is FALSE. Should be switched to TRUE if intending to estimate Average Marginal Effects.

robust

logical. If set to TRUE the outer product or BHHH estimate of the meat in the sandwich of the variance-covariance matrix is calculated. If calculated standard errors will be calculated using the sandwich estimator by default when calling summary.

Force

logical. If set to FALSE (the default) the function stops if the response variable has more than twenty categories. Should be changed to TRUE if a model with more than twenty categories is desired.

Details

object of class "oglmx", see oglmx.

Value

object of class "oglmx", see oglmx.

Author(s)

Nathan Carroll, nathan.carroll@ur.de

See Also

polr for alternative method to estimate an ordered logit model. oglmx. To obtain marginal effects see margins.oglmx.


oglmx documentation built on May 2, 2019, 5:14 a.m.