Skip to content

caseweights in linear models #743

Open

Description

@josef-pkt

(I'm opening this specifically for linear models, because in WLS we have potentially different interpretation of weights.)

Using WLS with weights as case weights, I cannot replicate what we would get with expanding the arrays to all observations (np.repeat) or with the t-test in stats.weightstats which uses that caseweight interpretation.

We still need to get the interpretation of weights cleared up, Stata has 3 kinds, SAS in some formulas has two kinds.

specific case: in a simple two-sample mean comparison, WLS with weights as caseweights produces the same estimate for the weighted means and mean differences, but not the correct t-values. (not "correct" for the case weight interpretation)

both RLM and GLM might need extra support from WLS if their weights definitions are expanded.

related:


links to Stata:
case weights are called frequency weights, while WLS test suite is written for aweights
http://www.stata.com/help.cgi?weights
also http://www.ats.ucla.edu/stat/stata/faq/weights.htm

description for aweights http://www.stata.com/support/faqs/statistics/analytical-weights-with-linear-regression/

Activity

  1. josef-pkt commented on Apr 1, 2013

    @josef-pkt
    MemberAuthor

    partially related:
    http://galton.uchicago.edu/~s343/Handouts/wls.html
    interesting is that in last part scale is fixed a priori, not estimated, see discussion in scipy on curve_fit cov_params scaling

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

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions