get_marginal_effects: Calculates the marginal effects of an N x p matrix...

View source: R/marginal_effects.R

get_marginal_effectsR Documentation

Calculates the marginal effects of an N x p matrix (wide-format) of qreg coefficients

Description

Calculates the marginal effects of an N x p matrix (wide-format) of qreg coefficients

Usage

get_marginal_effects(
  qreg_coeffs,
  avg_spacings,
  j_star,
  calc_se = TRUE,
  qreg_vcv_vec = NULL
)

Arguments

qreg_coeffs

wide-format of calculated spacings point estimates

avg_spacings

average spacings matrix, which can be calculated from setting calculateAvgME = TRUE or using the avg_spacing function directly

j_star

the first quantile the user wishes to predict (usually the middle one)

calc_se

boolean value, indicating whether the user wishes to calculate the marginal effect standard errors

qreg_vcv_vec

variance-covariance matrix from point estimates, only necessary if calculating standard errors

Value

list of values: avgME: calculated average marginal effects avgME_se (user-specified): standard errors on the calculated marginal effects


be-green/quantspace documentation built on March 20, 2024, 5:30 p.m.