Learn R Programming

bife (version 0.1)

apeff.bife: Average Partial Effects for Binary Choice Models with Fixed Effects

Description

apeff.bife is a function used to compute average partial effects for fixed effects binary choice models. It is able to compute bias-corrected average partial effects derived by Newey and Hahn (2004) to account for the incidental parameters bias.

Usage

apeff.bife(mod, discrete, bias.corr = "semi", iter.demeaning = 100, tol.demeaning = 1e-05, iter.offset = 1000, tol.offset = 1e-05)

Arguments

mod
an object of class bife.
discrete
a description of the variables that are discrete regressors. For apeff.bife this has to be a character string naming the discrete regressors.
bias.corr
an optional string that specifies the type of the bias correction: semi, analytical, jackknife. The value should be any of the values "semi", "ana", or "jack". Default is "semi" (semi bias-correction). Details are given under Details.
iter.demeaning
an optional integer value that specifies the maximum number of iterations of the demeaning algorithm. Default is 100. Details are given under Details.
tol.demeaning
an optional number that specifies the tolerance level of the demeaning algorithm. Default is 1e-5. Details are given under Details.
iter.offset
an optional integer value that specifies the maximum number of iterations of the offset algorithm for the computation of bias-adjusted fixed effects. Default is 1000. Details are given under Details.
tol.offset
an optional number that specifies the tolerance level of the offset algorithm for the computation of bias-adjusted fixed effects. Default is 1e-5. Details are given under Details.

Value

An object of apeff.bife returns a named matrix with at least a first column "apeff" containing the uncorrected average partial effects of the structural variables. An optional second column "apeff.corrected" is returned containing the corrected average partial effects of the structural variables given the choosen bias-correction (semi, analytical, or jackknife).

Details

The semi bias-corrected average partial effects are computed as usual partial effects with the bias-adjusted fixed effects and the bias-corrected structural parameters depending on which bias-correction (analytical or jackknife) has been used in the previously conducted bife command, i.e. which kind of bias-corrected coefficients are stored in the object mod.

The analytical and jackknife bias-corrected average partial effects follow Newey and Hahn (2004). The jackknife bias-correction requires to repeatedly calling bife (IWLS demeaning algorithm) and to estimate the fixed effects model on a subset of the data where the t-th period is excluded. For further details consult the description of bife.

Note: Bias-corrected partial effects can be only returned if the object mod returns bias-corrected coefficients, i.e. if a bias-correction (analytical or jackknife) has been used in the previous bife command.

References

Hahn, J., and W. Newey (2004). "Jackknife and analytical bias reduction for nonlinear panel models." Econometrica 72(4), 1295-1319.

Stammann, A., F. Heiss, and D. McFadden (2016). "Estimating Fixed Effects Logit Models with Large Panel Data". Working paper.

See Also

bife

Examples

Run this code
library("bife")

# Load 'psid' dataset
data.set <- psid
head(data.set)

# Fixed effects logit model w/o bias-correction
mod.no <- bife(LFP ~ AGE + I(INCH / 1000) + KID1 + KID2 + KID3 | ID,
 data = data.set, bias.corr = "no")
               
# Compute uncorrected average partial effects for mod.no
# Note: bias.corr does not affect the result
apeff.bife(mod.no, discrete = c("KID1", "KID2", "KID3")) 

# Fixed effects logit model with analytical bias-correction
mod.ana <- bife(LFP ~ AGE + I(INCH / 1000) + KID1 + KID2 + KID3 | ID,
 data = data.set)
               
# Compute semi-corrected average partial effects for mod.ana
apeff.bife(mod.ana, discrete = c("KID1", "KID2", "KID3"))

# Compute analytical bias-corrected average partial effects
# for mod.ana
apeff.bife(mod.ana, discrete = c("KID1", "KID2", "KID3"),
 bias.corr = "ana")

Run the code above in your browser using DataLab