Description Usage Arguments Details Value Author(s) References See Also Examples
Binary Choice models. These models are estimated by
binaryChoice
, intended to be called by wrappers like
probit
.
1 2 3 4 5 6 7 8 9  probit(formula, weights = NULL, ...)
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="NewtonRaphson",
... )

formula 
a symbolic description of the model to be fit, in the
form 
weights 
an optional vector of ‘prior weights’ to be used in the fitting process. Should be NULL or a numeric vector. 
subset 
an optional vector specifying a subset of observations to be used in the fitting process. 
na.action 
a function which indicates what should happen when the data contain 'NA's. The default is set by the 'na.action' setting of 'options', and is 'na.fail' if that is unset. The 'factoryfresh' default is 'na.omit'. Another possible value is 'NULL', no action. Value 'na.exclude' can be useful. 
start 
inital value of parameters. 
data 
an optional data frame containing the variables in the
model. If not found in data, the
variables are taken from environment(formula), typically the
environment from which 
x, y, model 
logicals. If TRUE the corresponding components of the fit (the model matrix, the response, the model frame) are returned. 
method 
the method to use; for fitting, currently only method = "ML" (Maximum Likelihood) is supported; method = "model.frame" returns the model frame (the same as with model = TRUE, see below). 
userLogLik 
loglikelihood function. A function of the
parameter to be estimated, which computes
the log likelihood. If supplied, it will be used instead of

cdfLower, cdfUpper, pdf, gradPdf 
function, lower and upper tail of the cumulative distribution function of the disturbance term, corresponding probability density function, and gradient of the density function. These functions must take a numeric vector as the argument, and return numeric vector of the probability/gradient values. 
logCdfLower, logCdfUpper, logPdf 
logs of the corresponding functions. Providing these may improve precision in extreme tail. If not provided, simply logs are takes of the corresponding nonlog values. 
maxMethod 
character, a maximisation method supported by

... 
further arguments for 
The dependent variable for the binary choice models must have exactly two levels (e.g. '0' and '1', 'FALSE' and 'TRUE', or 'no' and 'yes'). Internally, the first level is always coded '0' ('failure') and the second level as '1' ('success'), no matter of the actual value. However, by default the levels are ordered alphabetically and this makes puts '1' after '0', 'TRUE' after 'FALSE' nad 'yes' after 'no'.
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 NewtonRaphson optimizer.
probit
implements an outlierrobust loglikelihood (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.
An object of class "binaryChoice". It is a list with following components:
LRT 
Likelihood ration test. The full model is tested against H0: the parameters (besides constant) have no effect on the result. This is a list with components
LRT is distributed by chi2(df) under H0. 
param 
A list with following background information:

df.residual 
degrees of freedom of the residuals. 
x 
if requested, the model matrix used. 
y 
if requested, the model response used. The response is represented internally as 0/1 integer vector. 
model 
the model frame, only if 
na.action 
information returned by 
Other components are inherited from maxLik
.
probit
adds class "probit" and following components to
the "binaryChoice" object:
family 
the family object used ( 
Ott Toomet otoomet@ut.ee, Arne Henningsen
Demidenko, Eugene (2001) “Computational aspects of probit model”, Mathematical Communications 6, 233247
maxLik
for readypackaged likelihood maximisation
routines and methods, glm
for generalised linear models,
including probit, binomial
, and probitmethods
.
1 2 3 4 5 6 7 8 9 10 11 12  ## 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))

Loading required package: maxLik
Loading required package: miscTools
Please cite the 'maxLik' package as:
Henningsen, Arne and Toomet, Ott (2011). maxLik: A package for maximum likelihood estimation in R. Computational Statistics 26(3), 443458. DOI 10.1007/s0018001002171.
If you have questions, suggestions, or comments regarding the 'maxLik' package, please use a forum or 'tracker' at maxLik's RForge site:
https://rforge.rproject.org/projects/maxlik/

Probit binary choice model/Maximum Likelihood estimation
NewtonRaphson maximisation, 5 iterations
Return code 1: gradient close to zero (gradtol)
LogLikelihood: 46.06895
Model: Y == 'TRUE' in contrary to 'FALSE'
100 observations (23 'negative' and 77 'positive') and 2 free parameters (df = 98)
Estimates:
Estimate Std. error t value Pr(> t)
(Intercept) 0.11771 0.25708 0.4579 0.6470562
x 1.95465 0.52717 3.7078 0.0002091 ***

Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Significance test:
chi2(1) = 15.71736 (p=7.354591e05)


Probit binary choice model/Maximum Likelihood estimation
NewtonRaphson maximisation, 4 iterations
Return code 8: successive function values within relative tolerance limit (reltol)
LogLikelihood: 435.1312
Model: Y == '1' in contrary to '0'
753 observations (325 'negative' and 428 'positive') and 10 free parameters (df = 743)
Estimates:
Estimate Std. error t value Pr(> t)
(Intercept) 9.7472e+00 1.1399e+00 8.5510 < 2.2e16 ***
kidsTRUE 2.3059e01 1.3523e01 1.7051 0.0881666 .
age30.39TRUE 1.7823e01 1.1702e01 1.5231 0.1277444
age50.60TRUE 5.1400e01 1.4898e01 3.4501 0.0005605 ***
educ 1.2152e01 3.0062e02 4.0423 5.293e05 ***
hushrs 7.3534e04 1.0388e04 7.0791 1.451e12 ***
huseduc 3.0972e02 2.2452e02 1.3794 0.1677569
huswage 2.1450e01 2.4015e02 8.9316 < 2.2e16 ***
mtr 1.0490e+01 1.1529e+00 9.0990 < 2.2e16 ***
motheduc 5.8362e03 1.6638e02 0.3508 0.7257541

Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Significance test:
chi2(9) = 159.4841 (p=9.505426e30)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.