expreg | R Documentation |
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
expreg(
formula,
data,
subset,
weights,
na.action,
offset,
method = c("iv", "gmm", "ls"),
error = c("mult", "add"),
...
)
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 |
method |
one of |
error |
one of |
... |
further arguments |
an object of class "micsr"
, see micsr::micsr
for further details.
Yves Croissant
MULL:97micsr
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.