hetprob {Rchoice} | R Documentation |
Estimate heteroskedastic binary (Probit or Logit) model.
Description
Estimation of binary dependent variables, either probit or logit, with heteroskedastic error terms for cross-sectional dataset.
Usage
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 |
data |
the data of class |
link |
the assumption of the distribution of the error term. It could be either |
... |
arguments passed to |
x , object |
an object of class |
eigentol |
the standard errors are only calculated if the ratio of the smallest and largest eigenvalue of the Hessian matrix is less than |
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, |
Details
The heterokedastic binary model for cross-sectional data has the following structure:
with
where is the latent (unobserved) dependent variable for individual
;
is a
vector of independent variables determining the latent variable
(
x
variables in formula
);
and is the error term distributed either normally or logistically with
and heterokedastic variance
.
The variance for each individual is modeled parametrically assuming that it depends on a
vector observed variables
(
z
in formula
), whereas is the vector of parameters associated with each variable.
It is important to emphasize that
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:
Value
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. |
Author(s)
Mauricio Sarrias.
References
Greene, W. H. (2012). Econometric Analysis. 7 edition. Prentice Hall.
Examples
# Estimate a heteroskedastic probit and logit model
data("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)