Compute average partial effects after fitting binary choice models with a two-/three-way error component
getAPEs
is a post-estimation routine that can be used to estimate average partial
effects with respect to all covariates in the model and the corresponding covariance matrix. The
estimation of the covariance is based on a linear approximation (delta method). Note that
the command automatically determines which of the regressors are continuous or binary.
Remark: The routine currently does not allow to compute average partial effects based on functional forms like interactions and polynomials.
getAPEs( object = NULL, n.pop = NULL, panel.structure = c("classic", "network"), sampling.fe = c("independence", "unrestricted"), weak.exo = FALSE )
object |
an object of class |
n.pop |
unsigned integer indicating a finite population correction for the estimation of the
covariance matrix of the average partial effects proposed by
Cruz-Gonzalez, Fernández-Val, and Weidner (2017). The correction factor is computed as follows:
(n.pop - n) / (n.pop - 1),
where n.pop and n are the size of the entire
population and the full sample size. Default is |
panel.structure |
a string equal to |
sampling.fe |
a string equal to |
weak.exo |
logical indicating if some of the regressors are assumed to be weakly exogenous (e.g.
predetermined). If object is of class |
The function getAPEs
returns a named list of class "APEs"
.
Cruz-Gonzalez, M., I. Fernández-Val, and M. Weidner (2017). "Bias corrections for probit and logit models with two-way fixed effects". The Stata Journal, 17(3), 517-545.
Czarnowske, D. and A. Stammann (2020). "Fixed Effects Binary Choice Models: Estimation and Inference with Long Panels". ArXiv e-prints.
Fernández-Val, I. and M. Weidner (2016). "Individual and time effects in nonlinear panel models with large N, T". Journal of Econometrics, 192(1), 291-312.
Fernández-Val, I. and M. Weidner (2018). "Fixed effects estimation of large-t panel data models". Annual Review of Economics, 10, 109-138.
Hinz, J., A. Stammann, and J. Wanner (2020). "State Dependence and Unobserved Heterogeneity in the Extensive Margin of Trade". ArXiv e-prints.
Neyman, J. and E. L. Scott (1948). "Consistent estimates based on partially consistent observations". Econometrica, 16(1), 1-32.
# Generate an artificial data set for logit models library(alpaca) data <- simGLM(1000L, 20L, 1805L, model = "logit") # Fit 'feglm()' mod <- feglm(y ~ x1 + x2 + x3 | i + t, data) # Compute average partial effects mod.ape <- getAPEs(mod) summary(mod.ape) # Apply analytical bias correction mod.bc <- biasCorr(mod) summary(mod.bc) # Compute bias-corrected average partial effects mod.ape.bc <- getAPEs(mod.bc) summary(mod.ape.bc)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.