effect.hetprob: Get average marginal effects for heterokedastic binary models

View source: R/effects.R

effect.hetprobR Documentation

Get average marginal effects for heterokedastic binary models

Description

Obtain the average marginal effects from hetprob class model.

Usage

## 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), ...)

Arguments

object

an object of class hetprob and effect.hetprob for summary and print method.

vcov

an estimate of the asymptotic variance-covariance matrix of the parameters for a hetprob object.

digits

the number of digits.

...

further arguments.Ignored.

x

an object of class effect.hetprob.

Details

This function allows to obtain the average marginal effects (not the marginal effects at the mean). The standard errors are computed using Delta Method.

Value

An object of class effect.heprob.

Author(s)

Mauricio Sarrias.

Examples


# 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)


Rchoice documentation built on March 31, 2023, 11:13 p.m.