rstatix icon indicating copy to clipboard operation
rstatix copied to clipboard

feature request: pass lm() specific arguments (e.g., weights) to lm() calls

Open vshsurgo opened this issue 4 years ago • 1 comments

stats::lm() takes additional arguments such as "weights". It would be great to be able to pass this argument to calls of it within anova_test() and factorial_design()

vshsurgo avatar May 18 '20 18:05 vshsurgo

I need to use a weight correlation because some samples represent more population than others. I know how to do a weighted correlation matrix but not using cor_test (e.g., cor.wt {psych}, or cov.wt(data %>% select(-weight), wt=data$weight, cor=TRUE)).

Would it be possible to implement a weighted (and pairwise) correlation here? Super appreciate if there is help or recommendations.

abuabara avatar Feb 28 '21 17:02 abuabara