Skip to content

ENH/DOC WLS when weights are not var_weights (e.g. survey weighting) #9070

Open

Description

@josef-pkt

Reading Li and Valliant
#9067 (comment)

They have a case where the model implied cov_params for WLS params is

cov(beta) = sigma^2 A^{-1} X' W^2 X A^{-1} where A = X' W X

why is W squared in the inner part of the sandwich?

From GLS/WLS:

params = (X' W X)^{-1} X' W y
sandwich cov_params cov(beta) = A^{-1} [X' W V W X] A^{-1} if V = cov(u) (nobs, nobs)

  • If W is correctly specified var_weights, then W = V^{-1}, then sandwich simplifies to cov(beta) = sigma^2 A^{-1} = sigma^2 (X' W X)^{-1}
    This is default nonrobust cov_params of WLS
  • If W is not correctly specified var_weights, then
    • general case: We need the (HC) sandwich
    • special case: V = I, i.i.d., homoscedastic variance but W is some weighting we use, then
      cov(beta) = sigma^2 A^{-1} X' W^2 X A^{-1}

(see also Green chapter on heteroscedasticity, ch. 11 in 5th edition)

Conclusions:

  • WLS cov_params is incorrect if weights are not correctly specified inverse variances.
  • generic sandwich form (Huber, White, GMM, HC) provides correct cov_params
  • We might want to impose additional assumptions on cov(momend_conditions) and avoid robustness to unspecified misspecification/heteroscedasticity., e.g. the last case above.

The last one is currently not available in WLS or GLM with some weights.

related
#7861
#6794
#1379 RLM cov_params is not HC
#5327 cov_type for Theil/Ridge, maybe related
#1074 modelled but misspecified heteroscedasticity WLS+HC
and others

It's not yet clear to me what this implies for different models and cases.
IPW, survey weighting: poisson with some weights but assuming correctly specified distribution ?

Activity

  1. josef-pkt commented on Nov 24, 2023

    @josef-pkt
    MemberAuthor

    more general estimating equations but more specific to survey/calibration weighting

    Binder, David A., and Zdenek Patak. “Use of Estimating Functions for Estimation from Complex Surveys.” Journal of the American Statistical Association 89, no. 427 (1994): 1035–43. https://doi.org/10.2307/2290931.

    Wu, Changbao, and Mary E. Thompson. Sampling Theory and Practice. ICSA Book Series in Statistics. Cham: Springer International Publishing, 2020. https://doi.org/10.1007/978-3-030-44246-0.

    section 7.2 Survey Weighted Estimating Equations looks interesting (based on very brief look)
    AFAICS, the inner part of the sandwich cov(moms) depends on the sampling scheme of the survey design.

    related
    it looks like "calibration weighting" is the term for weighting towards a target population
    for example
    Wu, Changbao, and Wilson W. Lu. “Calibration Weighting Methods for Complex Surveys.” International Statistical Review 84, no. 1 (2016): 79–98. https://doi.org/10.1111/insr.12097.

    #3759 and maybe other issues
    note:
    Using weights in regression computes target average even if there is unmodelled heterogeneity.
    similar to semi-/non-parametric identification of ATE, ...
    Using weights in predict based on sample-estimated model assumes model is correctly specified for target population/exog

  2. josef-pkt commented on Nov 24, 2023

    @josef-pkt
    MemberAuthor

    another possible application:

    class weights in machine learning
    e.g. increase weight of rare events in sample.
    This needs corrected cov_params (which the machine learning packages don't care about)

  3. added this to the 0.15 milestone on Nov 24, 2023
  4. josef-pkt commented on Nov 24, 2023

    @josef-pkt
    MemberAuthor

    ok that gives enough background to add another weight class to GLM, ...
    p_weights, prob_weights ?

    freq_weights and var_weights are part of the likelihood model, so MLE is well defined.
    pweights are not appropriate with MLE, we need an M-estimator with sandwich form of cov_params, but maybe not the generic HC, ... We have a very specific deviation from the score function in the estimating equation, that we can take into account without, for example, giving up on the assumption of correctly specified likelihood.

    #4234

    update
    We should get a more generic name for those weights.
    Interpretation is that they just multiply the estimating equations for an M-estimator.
    ee_weights (estimating equations)
    g_weights (generic)
    est_weights (estimation)
    a_weights (imitating Stata)
    w_weights (weighting weights :)
    ...
    ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions