logit.reg {oglmx}R Documentation

Fit Logit Model.

Description

Wrapper function for oglmx to estimate the binary response logit model.

Usage

logit.reg(formula, data, start = NULL, weights=NULL, beta = NULL, 
          analhessian = TRUE, na.action, savemodelframe = FALSE, robust = 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 with two values.

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. If of length one the value is presumed to correspond to the constant. If of length greater than one then NA should be entered for elements of the vector to be estimated.

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

Value

object of class "oglmx", see oglmx.

Author(s)

Nathan Carroll, nathan.carroll@ur.de

See Also

glm for alternative method to estimate a logit model. oglmx. To obtain marginal effects see margins.oglmx.


[Package oglmx version 3.0.0.0 Index]