fepoisson_asymmetric: Asymmetric Poisson Pseudo-Maximum Likelihood (APPML)...

View source: R/fepoisson_asymmetric.R

fepoisson_asymmetricR 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:

  1. Computes residuals from the current fit

  2. Updates weights as w_i = |\tau - \mathbf{1}(r_i < 0)|

  3. Re-fits the weighted Poisson model

  4. 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

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)


capybara documentation built on June 15, 2026, 9:10 a.m.