Skip to content

spatial regression model

3 messages · Arnaud Mosnier, Zia Ahmed, Paolo Piras

#
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:

  
    
#
Dear Zia and all those that answered me,
thankyou very much for your advices; I will surely include them  in my analyses
thankyou again
paolo