View source: R/fepoisson_asymmetric.R
| fepoisson_asymmetric | R Documentation |
Fits an asymmetric Poisson pseudo-maximum likelihood model with high-dimensional fixed effects using expectile regression. This approach extends standard PPML by allowing different weights for positive and negative residuals, enabling estimation of conditional expectiles rather than the conditional mean.
fepoisson_asymmetric(
formula = NULL,
data = NULL,
weights = NULL,
beta_start = NULL,
eta_start = NULL,
offset = NULL,
control = NULL
)
formula |
an object of class |
data |
an object of class |
weights |
an optional string with the name of the prior weights variable in |
beta_start |
an optional vector of starting values for the structural parameters in the linear predictor.
Default is |
eta_start |
an optional vector of starting values for the linear predictor. |
offset |
an optional formula or numeric vector specifying an a priori known component to be included in the
linear predictor. If a formula, it should be of the form |
control |
a named list of parameters for controlling the fitting process. See fit_control for details. |
The APPML estimator minimizes an asymmetric loss function based on expectiles. For a given expectile \tau,
observations with negative residuals receive weight \tau while observations with positive residuals
receive weight 1 - \tau. The algorithm iteratively:
Computes residuals from the current fit
Updates weights as w_i = |\tau - \mathbf{1}(r_i < 0)|
Re-fits the weighted Poisson model
Checks convergence using (b - b_{old})' V^{-1} (b - b_{old}) < \epsilon
The expectile parameter is specified via control = fit_control(expectile = ...). When
expectile = 0.5, the estimator is equivalent to standard PPML. Values below 0.5 estimate
lower conditional expectiles (more sensitive to small values), while values above 0.5 estimate
upper conditional expectiles (more sensitive to large values).
A named list of class "feglm" containing:
coefficients |
named vector of estimated coefficients |
vcov |
variance-covariance matrix of coefficients |
eta |
linear predictor |
fitted_values |
fitted values from the final iteration |
residuals |
residuals from the final fit |
weights |
observation weights used in final fit |
appml_weights |
asymmetric weights used in APPML algorithm |
deviance |
the deviance of the model |
null_deviance |
the null deviance of the model |
conv |
logical indicating whether inner GLM converged |
conv_outer |
logical indicating whether APPML outer loop converged |
iter |
number of inner iterations |
iter_outer |
number of outer APPML iterations |
expectile |
the expectile value used |
objective_function |
final value of the convergence criterion |
negative_residuals_share |
proportion of negative residuals in final fit |
nobs |
a named vector with the number of observations |
fe_levels |
a named vector with the number of levels in each fixed effect |
nms_fe |
a list with the names of the fixed effects variables |
formula |
the formula used in the model |
family |
the family used in the model (Poisson) |
control |
the control list used in the model |
Newey, W. K., & Powell, J. L. (1987). Asymmetric least squares estimation and testing. Econometrica, 55(4), 819-847.
fepoisson, feglm, fit_control
ross2004_subset <- ross2004[ross2004$year == 1999, ]
ross2004_subset <- ross2004_subset[ross2004_subset$ltrade >
quantile(ross2004_subset$ltrade, 0.75), ]
# Lower expectile (10th) - more weight on negative residuals
fit10 <- fepoisson_asymmetric(
ltrade ~ ldist | ctry1, ross2004_subset,
control = fit_control(expectile = 0.1)
)
summary(fit10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.