Learn R Programming

tobit1 (version 0.1-3)

ivtobit: 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.

References

SMIT:BLUN:86tobit1

Examples

Run this code
# NOT RUN {
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)
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") 
# }

Run the code above in your browser using DataLab