ivldv: Instrumental variable estimators for limited dependent...

View source: R/ivldv.R

ivldvR Documentation

Instrumental variable estimators for limited dependent variable

Description

Estimation of simultaneous-equation models when the response is binomial or censored

Usage

ivldv(
  formula,
  data,
  subset = NULL,
  weights = NULL,
  na.action,
  offset,
  method = c("twosteps", "minchisq", "ml", "test"),
  model = c("probit", "tobit"),
  robust = TRUE,
  left = 0,
  right = Inf,
  trace = 0,
  ...
)

endogtest(x, ...)

## S3 method for class 'formula'
endogtest(x, ..., data, model = c("probit", "tobit"))

## S3 method for class 'ivldv'
endogtest(x, ...)

Arguments

formula

a symbolic description of the model,

data

a data frame,

subset, weights, na.action, offset

see lm,

method

one of "ml" for maximum likelihood, "twosteps"and"minchisq"'

model

one of "probit" or "tobit",

robust

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

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,

trace

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

...

further arguments

x

on object returned by ivldv

Value

An object of class c('ivldv', 'lm')

Author(s)

Yves Croissant

References

\insertRef

SMIT:BLUN:86micsr

\insertRef

RIVE:VUON:88micsr

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
trade_protection <- dplyr::mutate(micsr::trade_protection,
                                 y = ntb / (1 + ntb),
                                 x1 = vshipped / imports / elast,
                                 x2 = cap * x1,
                                 x3 = labvar)
GH <- ivldv(Formula::as.Formula(y  ~  x1 + x2, inst), trade_protection,
            method = "twosteps", model = "tobit") 
Full <- ivldv(Formula::as.Formula(y ~ x1 + x2 + labvar, inst), trade_protection,
              method = "twosteps", model = "tobit") 
Short <- ivldv(Formula::as.Formula(y ~ x1 + I(x2 + labvar), inst),
                 trade_protection, method = "twosteps", model = "tobit")
bank_msq <- ivldv(federiv ~ eqrat + optval + bonus + ltass + linsown + linstown +
                  roe + mktbk + perfor + dealdum + div + year | . - eqrat - bonus -
                  optval + no_emp + no_subs + no_off + ceo_age + gap + cfa,
                  data = federiv, method = "minchisq")
bank_ml <- update(bank_msq, method = "ml")
bank_2st <- update(bank_msq, method = "twosteps")

micsr documentation built on May 29, 2024, 7:32 a.m.