| effect.hetprob | R Documentation |
Obtain the average marginal effects from hetprob class model.
## S3 method for class 'hetprob'
effect(object, vcov = NULL, digits = max(3, getOption("digits") - 2), ...)
## S3 method for class 'effect.hetprob'
summary(object, ...)
## S3 method for class 'effect.hetprob'
print(x, ...)
## S3 method for class 'summary.effect.hetprob'
print(x, digits = max(3, getOption("digits") - 3), ...)
object |
an object of class |
vcov |
an estimate of the asymptotic variance-covariance matrix of the parameters for a |
digits |
the number of digits. |
... |
further arguments.Ignored. |
x |
an object of class |
This function allows to obtain the average marginal effects (not the marginal effects at the mean). The standard errors are computed using Delta Method.
An object of class effect.heprob.
Mauricio Sarrias.
# Data
library("AER")
data("PSID1976")
PSID1976$lfp <- as.numeric(PSID1976$participation == "yes")
PSID1976$kids <- with(PSID1976, factor((youngkids + oldkids) > 0,
levels = c(FALSE, TRUE),
labels = c("no", "yes")))
PSID1976$finc <- PSID1976$fincome / 10000
# Average marginal effects for heteroskedastic Probit model
labor_het <- hetprob(lfp ~ age + I(age^2) + finc + education + factor(kids) |
factor(kids) + finc,
data = PSID1976,
link = "probit")
eff_labor_het <- effect(labor_het)
summary(eff_labor_het)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.