Closed Deleetdk closed 6 years ago
Type 1 SS is sequential and order-dependent so is seldom appropriate. rms
anova
uses type 2 SS but has a different philosophy of not making it easy for the user to obtain 'main effect' tests that are adjusted for but do not include interaction effects. The preferred method is instead used: pool lower order terms with higher order terms (main effect + interaction).
I am trying to calculate omega² as effect size measures (instead of the usual eta² which is biased) for complex models such that one can compare the relative importance of predictors. In base R, this is a little tricky because various R functions use different sum of square types:
stats::anova
uses type 1,car::Anova
can use type 2 and 3. Unfortunately,car::Anova
does not work for rms fits:I can't use
stats::lm
because I need thercs()
from rms for nonlinearity.But rms has its own S3 method for the
anova
generic:But it is not clear which kind of sum of squares is used. Presumably type 1 since it's a method for the
stats::anova
. Is there some way to get type 2 and 3 squares that I can use for computing omega²? I didn't see anything in the docs forrms::anova.rms
.