linear regression - How should I incorporate State N as a weight variable in SPSS? -
my data structure is:
state n var1 var2 alabama 23 54 42 alaska 4 53 53 arizona 53 75 65
var1 , var2 aggregated percentage values @ state level. n number of participants in each state. run linear regression between var1 , var2 consideration of n weight, best way in spss?
you can either use weight by
or use subcommand on regression
- examples below.
data list free / state (a15) n var1 var2 (3f2.0). begin data alabama 23 54 42 alaska 4 53 53 arizona 53 75 65 end data. weight n. regression /missing listwise /statistics coeff outs r anova /criteria=pin(.05) pout(.10) /noorigin /dependent var1 /method=enter var2. *or using subcommand. weight off. regression /missing listwise /regwgt=n /statistics coeff outs r anova /criteria=pin(.05) pout(.10) /noorigin /dependent var1 /method=enter var2.
you can see these 2 procedures produce same estimates. , if run regression without weighting or using regwgt
subcommand result in different estimates example.
Comments
Post a Comment