binaryChoice
, intended to be called by wrappers like
probit
.probit(formula, ...)
binaryChoice(formula, subset, na.action, start = NULL, data = sys.frame(sys.parent()),
x=FALSE, y = FALSE, model = FALSE, method="ML",
userLogLik=NULL,
cdfLower, cdfUpper=function(x) 1 - cdfLower(x),
logCdfLower=NULL, logCdfUpper=NULL,
pdf, logPdf=NULL, gradPdf,
maxMethod="Newton-Raphson",
... )
response ~ explanatory variables
(see also details).probit
is called.cdfLower
and similar parameters. This allows user to
fine-tune the likelihood maxLik
. This is only useful if using
a user-supplied likelihood function.binaryChoice
and
maxLik
.link="probit"
Via the distribution function parameters, binaryChoice
supports generic latent linear index binary choice models with
additive disturbance terms. It is intended to be called by wrappers
like probit
. However, it is also visible in the namespace as
the user may want to implement her own models using another
distribution of the disturbance term.
The model is estimated using Maximum Likelihood and Newton-Raphson
optimizer.
probit
implements an outlier-robust log-likelihood (Demidenko,
2001). In case of large outliers the analytic Hessian is
singular while Fisher scoring approximation (used, for instance, by
glm
) is invertible. Those values are not
reliable in case of outliers.
No attempt is made to establish the existence of the estimator.
maxLik
for ready-packaged likelihood maximisation
routines and methods, glm
for generalised linear models,
including probit, binomial
.## A simple MC trial: note probit assumes normal errors
x <- runif(100)
e <- 0.5*rnorm(100)
y <- x + e
summary(probit((y > 0) ~ x))
## female labour force participation probability
data(Mroz87)
Mroz87$kids <- Mroz87$kids5 > 0 | Mroz87$kids618 > 0
Mroz87$age30.39 <- Mroz87$age < 40
Mroz87$age50.60 <- Mroz87$age >= 50
summary(probit(lfp ~ kids + age30.39 + age50.60 + educ + hushrs +
huseduc + huswage + mtr + motheduc, data=Mroz87))
Run the code above in your browser using DataLab