[R] does package "QuantPsych" function lm.beta can handle results of a regression with weights?

Dimitri Liakhovitski dimitri.liakhovitski at gmail.com
Thu Jul 22 19:34:39 CEST 2010


Hello, and sorry for not providing an example.
I run a regular linear regression (using lm) and use weights with it
(weights = ...).
I use "QuantPsych" package, its function lm.beta to extract
standardized regression weights from my lm regression object.

When I don't use weights, everything is fine.
But when I do use weights, I get an error that refers to lm.beta code:
"In b * sx : longer object length is not a multiple of shorter object length"

This happens because there is an extra column in the object:
regr$model that lm.beta is using to get at the betas.
Is there some other package that just gives me the standardized
regression weights - even if I used weights for regression?

Thank you!

-- 
Dimitri Liakhovitski
Ninah Consulting
www.ninah.com



More information about the R-help mailing list