Displaying 2 results from an estimated 2 matches for "quantpsych".
2010 Jul 22
1
does package "QuantPsych" function lm.beta can handle results of a regression with weights?
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...
2009 Nov 29
3
How to z-standardize for subgroups?
Hi folks,
I have a dataframe df.vars with the follwing structure:
var1 var2 var3 group
Group is a factor.
Now I want to standardize the vars 1-3 (actually - there are many
more) by class, so I define
z.mean.sd <- function(data){
return.values <- (data - mean(data)) / (sd(data))
return(return.values)
}
now I can call for each var
z.var1 <- by(df.vars$var1, group,