[R-sig-eco] vegan RsquareAdj() for lm models

2013-10-03 Thread Paolo Piras
Dear list, I would like to easily compute the adjusted R-square in a lm model without intercept (excluding the intercept is essential for my analysis) I found that RsquareAdj() in vegan returns NA if the argument is a multiple-multivariate lm model thus including multivariate responses and

Re: [R-sig-eco] vegan RsquareAdj() for lm models

2013-10-03 Thread Jari Oksanen
Specific reason is that nobody has implemented this. These things don't come by automatic writing, but somebody must do them. What would you expect to get? Is this what was on your mind: sapply(summary(lm(yy~xx-1)), function(x) c(r.squared = x$r.squared, adj.r.squared = x$adj.r.squared))

Re: [R-sig-eco] vegan RsquareAdj() for lm models

2013-10-03 Thread Paolo Piras
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

Re: [R-sig-eco] vegan RsquareAdj() for lm models

2013-10-03 Thread Jari Oksanen
Paolo, See ?RsquareAdj for the call interface. The default method can be called as RsquareAdj(x, n, m), and in the default method x is the unadjusted correlation, n is the number of observations and m is the number of parameters (degrees of freedom) in the fitted model. Specific methods for

Re: [R-sig-eco] vegan RsquareAdj() for lm models

2013-10-03 Thread Paolo Piras
Thanks Jari, I understand Before going trough the code of rda I would prefer to see if I can do this using RsquareAdj When you say The default method can be called as RsquareAdj(x, n, m), and in the default method x is the unadjusted correlation...etc.. my problem is to extract the global