Skip to content
Prev 4100 / 7420 Next

vegan RsquareAdj() for lm models

Thankyou very much Jari!
I think that it is nearly ok
what I would like to have is the same as in
RsquareAdj(vegan::rda(yy,xx))

that is a GLOBAL measure of the association
BUT...I want it for a multiple-multivariate lm model that does not include the intercept;
an alternative could be to build a rda design for the exclusion of intercept but I really cannot figure out how to do it. 

I think I just need to compute the average of single adjusted r squared from the output of your line of code, 
But the results are not identical 
EXAMPLE  WITH INTERCEPT IN ORDER TO COMPARE WITH RDA

RsquareAdj(vegan::rda(yy,xx))
mean(sapply(summary(lm(yy~xx)), function(x) c("r.squared" = x$r.squared, "adj.r.squared" = x$adj.r.squared))[2,])

Or.... I just miss something in this computation

Thanks again for any further suggestion