ivtobit: Simultaneous-equation tobit model

View source: R/ivtobit.R

ivtobitR Documentation

Simultaneous-equation tobit model

Description

Estimation of simultaneous-equation models when the response is trunctaed

Usage

ivtobit(
  formula,
  data,
  subset = NULL,
  left = 0,
  right = Inf,
  method = c("ml", "2steps"),
  robust = TRUE,
  trace = 0
)

Arguments

formula

a symbolic description of the model,

data

a data frame,

subset

a subset,

left, right

left and right limits of the dependent variable. The default is respectively 0 and +Inf which corresponds to the most classic (left-zero truncated) tobit model,

method

one of "ml" for maximum likelihood, "2steps"',

robust

a boolean, if TRUE, a consistent estimation of the covariance of the coefficients is used for the 2-steps method,

trace

a boolean (the default if FALSE) if TRUE some information about the optimization process is printed,

Value

An object of class c('tobit1', 'lm'), see tobit1::tobit1 for more details.

Author(s)

Yves Croissant

References

\insertRef

SMIT:BLUN:86tobit1

Examples

inst <- ~ sic3 + k_serv + inv + engsci + whitecol + skill + semskill + cropland + 
    pasture + forest + coal + petro + minerals + scrconc + bcrconc + scrcomp + bcrcomp + meps + 
    kstock + puni + geog2 + tenure + klratio + bunion
#tradeprotection <- dplyr::mutate(tradeprotection,
#                                 y = ntb / (1 + ntb),
#                                 x1 = exports / imports / elast,
#                                 x2 = cap * x1)
tradeprotection$y <- with(tradeprotection, ntb / (1 + ntb))
tradeprotection$x1 <- with(tradeprotection, exports / imports/ elast)
tradeprotection$x2 <- with(tradeprotection, cap * x1)
GH <- ivtobit(Formula::as.Formula(y  ~  x1 + x2, inst), tradeprotection, method = "2steps") 
Full <- ivtobit(Formula::as.Formula(y ~ x1 + x2 + labvar, inst), tradeprotection, method = "2steps") 
Short <- ivtobit(Formula::as.Formula(y ~ x1 + I(x2 + labvar), inst),
                 tradeprotection, method = "2steps") 

ycroissant/tobit1 documentation built on July 1, 2022, 10:46 p.m.