[R] Weighted regresion using lm

Yu Shao yshao at wadsworth.org
Thu Oct 28 20:57:51 CEST 2004


Hi:

Could anyone help me to clarify this: are the weights normalized inside lm 
function (package:stats) before applied to the error term?  For example:

>lm (cost ~ material, weights=quatity, data=receipt)

will lm normalize quatity such that sum(quatity) = 1? I traced to lm.wfit and 
then the weights get transferred into a precompiled FORTRAN module so I can't 
figure out. Thanks!



> version
         _                   
platform sparc-sun-solaris2.9
arch     sparc               
os       solaris2.9          
system   sparc, solaris2.9   
status                       
major    1                   
minor    9.0                 
year     2004                
month    04                  
day      12                  
language R                


Yu Shao
Wadsworth Center
NY Department of Health
Albany, NY 12208




More information about the R-help mailing list