Repository navigation
Description
(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:
- PR Fix weights #504 with discussion in WLS/GLS post estimation results #501 made changes to match some WLS results to Stata and R, Fix weights #504 left GLS as an open issue
- issue Weights #505 is a general issue to check and make it consistent everywhere
- issue add case weights to likelihood models #481 asks specifically for case weights for maximum likelihood models
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
josef-pkt commentedon Apr 1, 2013
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