Re: [R-sig-eco] Question on Quadratic and Cubic Parameters

2013-10-03 Thread Zoltan Botta-Dukat
Dear Alexandre, If your variables have only positive values, there will be strong correlation between linear, quadratic and cubic terms that leads to high VIF. You can avoid it by centering the variables before calculating quadratic and cubic terms: quadratic<-(x-mean(x))^2 cubic<-(x-mean(x)

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 unad

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 uni

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

[R-sig-eco] Question on Quadratic and Cubic Parameters

2013-10-03 Thread Alexandre Fadigas de Souza
Dear colleagues, I am working on a Linear Mixed Model with nested structure, based on the book of Zuur et al. 2009. Mixed Effects Models and Extensions in Ecology with R, and have a question to ask to those of you more experienced with this model family. I am using several topographic va

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)

[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 mul