expreg: Instrumental variable estimation for exponential conditional...

View source: R/expreg.R

expregR Documentation

Instrumental variable estimation for exponential conditional mean models

Description

Exponential conditional mean models are particularly useful for non-negative responses (including count data). Least squares and one or two steps IV estimators are available

Usage

expreg(
  formula,
  data,
  subset,
  weights,
  na.action,
  offset,
  method = c("iv", "gmm", "ls"),
  error = c("mult", "add"),
  ...
)

Arguments

formula

a two-part right hand side formula, the first part describing the covariates and the second part the instruments

data

a data frame,

subset, weights, na.action, offset

see stats::lm

method

one of "gmm" (the default), "iv" or ls.

error

one of "mult" (the default) or "add" in order to get a model with respectively a multiplicative or an additive error

...

further arguments

Value

an object of class "micsr", see micsr::micsr for further details.

Author(s)

Yves Croissant

References

\insertRef

MULL:97micsr

Examples

cigmales <- dplyr::mutate(cigmales,
                          age2 = age ^ 2, educ2 = educ ^ 2, educage = educ * age,
                          age3 = age ^ 3, educ3 = educ ^ 3)
expreg(cigarettes ~ habit + price + restaurant + income + age + age2 + educ + educ2 +
                     famsize + race | . - habit + reslgth + lagprice + age3 + educ3 + educage,
                     data = cigmales)
expreg(birthwt ~ cigarettes + parity + race + sex | parity + race + sex +
                  edmother + edfather + faminc + cigtax, data = birthwt)

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