Estimate heteroskedastic binary (Probit or Logit) model.
Estimate heteroskedastic binary (Probit or Logit) model.
Estimation of binary dependent variables, either probit or logit, with heteroskedastic error terms for cross-sectional dataset.
hetprob(formula, data, link = c("probit","logit"),...)## S3 method for class 'hetprob'terms(x,...)## S3 method for class 'hetprob'model.matrix(object,...)## S3 method for class 'hetprob'estfun(x,...)## S3 method for class 'hetprob'bread(x,...)## S3 method for class 'hetprob'vcov(object, eigentol =1e-12,...)## S3 method for class 'hetprob'df.residual(object,...)## S3 method for class 'hetprob'coef(object,...)## S3 method for class 'hetprob'logLik(object,...)## S3 method for class 'hetprob'print(x,...)## S3 method for class 'hetprob'summary(object, eigentol =1e-12,...)## S3 method for class 'summary.hetprob'print(x, digits = max(3, getOption("digits")-2),...)## S3 method for class 'hetprob'predict(object, newdata =NULL, type = c("xb","pr","sigma"),...)
Arguments
formula: a symbolic description of the model of the form y ~ x | z where y is the binary dependent variable and x and z are regressors variables for the mean of the model and lnsigma.
data: the data of class data.frame.
link: the assumption of the distribution of the error term. It could be either link = "probit" or link = "logit".
...: arguments passed to maxLik.
x, object: an object of class hetprob.
eigentol: the standard errors are only calculated if the ratio of the smallest and largest eigenvalue of the Hessian matrix is less than eigentol. Otherwise the Hessian is treated as singular.
digits: the number of digits.
newdata: optionally, a data frame in which to look for variables with which to predict.
type: the type of prediction required. The default, type = xb, is on the linear prediction without the variance. If type = pr, the predicted probabilities of a positive outcome is returned. Finally, if type = sigma the predictions of σ for each individual is returned.
Returns
An object of class ```hetprob`'', a list elements: - logLik0: logLik for the homokedastic model,
f1: the formula,
mf: the model framed used,
call: the matched call.
Details
The heterokedastic binary model for cross-sectional data has the following structure:
yi∗=xi⊤β+ϵi,
with
var(ϵi∣xi,zi)=σi2=[exp(zi⊤δ)]2,
where yi∗ is the latent (unobserved) dependent variable for individual i=1,...,N; xi is a K×1 vector of independent variables determining the latent variable yi∗ (x variables in formula); and ϵi is the error term distributed either normally or logistically with E(ϵi∣zi,xi)=0
and heterokedastic variance var(ϵi∣xi,zi)=σi2,∀i=1,...,N. The variance for each individual is modeled parametrically assuming that it depends on a P×1
vector observed variables zi (z in formula), whereas δ is the vector of parameters associated with each variable. It is important to emphasize that zi does not include a constant, otherwise the parameters are not identified.
The models are estimated using the maxLik function from maxLik package using both analytic gradient and hessian (if Hess = TRUE). In particular, the log-likelihood function is:
# Estimate a heteroskedastic probit and logit modeldata("Health")het.probit <- hetprob(working ~ factor(female)+ factor(year)+ educ + age + I(age^2)| factor(female)+ age + I(age^2), data = Health, link ="probit")summary(het.probit)het.logit <- hetprob(working ~ factor(female)+ factor(year)+ educ + age + I(age^2)| factor(female)+ age + I(age^2), data = Health, link ="logit")summary(het.logit)
References
Greene, W. H. (2012). Econometric Analysis. 7 edition. Prentice Hall.