Skip to content
Prev 16555 / 29559 Next

spatial regression model

You can evaluate the proportion of the variance explained by spatial 
structure by  log-likelihood test-  between spatial model and a model 
with intercept:
suppose:

library(lnlme)

M1<-lme(response~ predictots+...., method="REML", correlation=corExp(form=~x+y, nugget=T), data=yourdata) # model with spatial structure
Mo<-gls(response~1,method = "REML",data=yourdata) # model with intercept only
anova(M1, Mo) # Compare two models

a<-logLiklehood value of M1
b<-logLiklehood value of Mo
n<- nrow(yourdata)

R2<- (1 - exp((-2/n)*( -a -b)))   # log-likelihood R^2 for M1
On 11/1/2012 8:48 AM, Arnaud Mosnier wrote: