Learn R Programming

micEcon (version 0.2-4)

tobit2: function to calculate Heckman-type selection models

Description

Heckman-type selection models are regressions with at least two latent equation and multivariate normal error term. Tobit-2 model is one particular type of those models (Amemiya 1985).

Usage

tobit2(selection, formula, data = sys.frame(sys.parent()), method="ml",
       b0=NULL, print.level=0,
       y1=FALSE, z=FALSE, y2=FALSE, x=FALSE, model=FALSE,
       ...)

Arguments

selection
a symbolic formula for the selection equation
formula
a symbolic formula for the equation of interest
data
an optional data frame containing the variables in the model. By default the variables are taken from environment(formula), typically the environment from which the function is called
method
the method of calculation: Maximum Likelihood (ml) or Heckman 2-step (2step)
b0
numeric, initial values of the parameters. The order is as follows: gamma (selection equation), beta (the equation of interest), sigma, rho (distribution of the error terms)
print.level
information about calculations. 0 -- nothing is printed, bigger numbers give more information. print.level is sent further to the maximisation algorithm, see maxNR.
y1, z, y2, x, model
logicals. If TRUE the corresponding components of the fit (the selection response, the selection model matrix, the equation response, the equation model matrix and both model frames) are returned.
...
further arguments to the maximisation algorithm, see maxNR.

Value

  • a list of class tobit2:
  • maximumlikelihood value at maximum
  • estimate(named) vector of estimates
  • twoStepobject of class "heckit", results of two-step estimation
  • NParamtotal number of parameters
  • NObstotal number of observations
  • N1number of observations where the response was not observed
  • N2number of observations where the response was observed
  • NZnumber of variables in the selection equation
  • NXnumber of variables in the main formula
  • dfresulting degrees of freedom
  • call, terms1, terms2call and terms of the model
  • Plus the components of maxLik.

WARNING

These models rely heavily on the parametric assumptions. Do not use them unless the exclusion restriction holds!

Details

Tobit 2 models have two latent variable regressions with jointly normal errors. If selection variable $y_1 = 0$, the formula response $y_2$ is not observable; if $y_1 = 1$, then $y_2 = y_2^*$. Values for unobservable selection are undefined, they are commonly assumed to be equal to 0. In the current function the values must be there but they are not used.

References

Amemiya 1985

See Also

heckit for the two-step estimation and probit for probit models

Examples

Run this code
## uniform observable covariates (note that exclusion restriction is
## fulfilled)!
myData <- data.frame( z = runif(500), x = runif(500) )
## latent selection variable
myData$y1s <- 2 * myData$z + rnorm(500)
myData$y1  <- myData$y1s > 0
## latent regressions
myData$y2s <- myData$x + 0.5 * rnorm(500)
myData$y2  <- ifelse( myData$y1 == 1, myData$y2s, 0)
plot( myData$z, myData$y2 )
a <- tobit2( y1~z, y2~x, data = myData )
summary(a)

Run the code above in your browser using DataLab