| fepoisson_asymmetric {capybara} | R Documentation |
Asymmetric Poisson Pseudo-Maximum Likelihood (APPML) Estimation
Description
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.
Usage
fepoisson_asymmetric(
formula = NULL,
data = NULL,
weights = NULL,
beta_start = NULL,
eta_start = NULL,
offset = NULL,
control = NULL
)
Arguments
formula |
an object of class "formula": a symbolic description of the model to be fitted. formula
must be of type response ~ slopes | fixed_effects | cluster.
|
data |
an object of class "data.frame" containing the variables in the model. The expected input is a
dataset with the variables specified in formula and a number of rows at least equal to the number of variables
in the model.
|
weights |
an optional string with the name of the prior weights variable in data.
|
beta_start |
an optional vector of starting values for the structural parameters in the linear predictor.
Default is \boldsymbol{\beta} = \mathbf{0}.
|
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 ~ variable.
|
control |
a named list of parameters for controlling the fitting process. See fit_control for details. |
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).
Value
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 |
References
Newey, W. K., & Powell, J. L. (1987). Asymmetric least squares estimation and testing. Econometrica, 55(4), 819-847.
See Also
fepoisson, feglm, fit_control
Examples
# Standard PPML (expectile = 0.5)
mod_ppml <- fepoisson_asymmetric(
mpg ~ wt | cyl, mtcars,
control = fit_control(expectile = 0.5)
)
summary(mod_ppml)
# Lower expectile (10th) - more weight on negative residuals
mod_low <- fepoisson_asymmetric(
mpg ~ wt | cyl, mtcars,
control = fit_control(expectile = 0.1)
)
# Upper expectile (90th) - more weight on positive residuals
mod_high <- fepoisson_asymmetric(
mpg ~ wt | cyl, mtcars,
control = fit_control(expectile = 0.9)
)
# Compare coefficients across expectiles
cbind(
low = coef(mod_low),
median = coef(mod_ppml),
high = coef(mod_high)
)