Skip to content
Back to formatted view

Raw Message

Message-ID: <e2d4dfd166664b2b9b4ebac9b82cb070@DB3PR04MB153.eurprd04.prod.outlook.com>
Date: 2013-10-03T11:59:15Z
From: Paolo Piras
Subject: vegan RsquareAdj() for lm models

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 multiple predictors, while it works for univariate response and multiple predictors. 

For example:
library(vegan)

yy<-matrix(rnorm(200,0,1),ncol=4)
xx<-matrix(rnorm(200,0,1),ncol=4)
RsquareAdj(lm(yy~xx-1))
RsquareAdj(lm(yy[,1]~xx-1))



There some specific reason for this behavior?
Thanks in advance for any advice
best regards
Poalo