

 



From: jimmyjuan1@hotmail.com
To: r-sig-geo@stat.math.ethz.ch
Subject: Modelling a variable which doesn't depend on its locality (constant-space-average)
Date: Mon, 29 Nov 2010 08:44:52 -0500




Hi. R-folks:
 
I have been working with some spacial data, where the AIC non spacial criteria is less than AIC spacial one.
 
My MCMC-running was following:
 
OP2003Seppos.spmod<-list(cov.pars=c(1.6,90),beta=1.0,cov.model="matern",nugget=0,kappa=0.35,family="binomial",link="logit")
#OP2003Febpos.spmod<-list(cov.pars=c[ (Sill total/Sill parcial) , rango(phi) ],beta=1.0,cov.model="matern",nugget=0,kappa=0.35,family="binomial",link="logit")
OP2003Seppos.mcmc<-mcmc.control(S.scale=0.579,thin=10) #mcmc Marcov chain - Monte Carlo
OP2003Seppos.tune<-glsm.mcmc(OP2003Sepposbin,model=OP2003Seppos.spmod,mcmc.input=OP2003Seppos.mcmc)
 #0.579=S.scale is where the variogram is stable ... until Acc.-rate VERY CLOSE TO 0.6)
#iter. numb. 1000  : Acc.-rate =  0.642 
#iter. numb. 2000  : Acc.-rate =  0.616 
#iter. numb. 3000  : Acc.-rate =  0.606 
#iter. numb. 4000  : Acc.-rate =  0.628 
#iter. numb. 5000  : Acc.-rate =  0.623 
#iter. numb. 6000  : Acc.-rate =  0.571 
#iter. numb. 7000  : Acc.-rate =  0.613 
#iter. numb. 8000  : Acc.-rate =  0.589 
#iter. numb. 9000  : Acc.-rate =  0.612 
#iter. numb. 10000  : Acc.-rate =  0.599 
#MCMC performed: n.iter. =  10000 ; thinning =  10 ; burn.in =  0 
 
OP2003Seppos.tune.coda<-create.mcmc.coda(OP2003Seppos.tune,mcmc.input=OP2003Seppos.mcmc)
autocorr.plot(OP2003Seppos.tune.coda,ask=TRUE)
#Waiting to confirm change of page...
#Waiting to confirm change of page...
#Waiting to confirm change of page...

#Then, I performed the lik fit:
OP2003Seppos.lf<-likfit.glsm(OP2003Seppos.pre.lf,ini.phi=90,hessian=TRUE,nugget.rel=0,fix.nugget.rel=FALSE,cov.model="matern",kappa=3.8)
#--------------------------------------------------------------------
#likfit.glsm: likelihood maximisation using the function optim.
#phi =  90 tausq.rel =  0 
#log-likelihood =  -244.892136834432 
#phi =  90.001 tausq.rel =  0 
.
.
.
 
#whose summary showed:
summary(OP2003Seppos.lf)
#Summary of the maximum likelihood parameter estimation
#-----------------------------------
#Family =  binomial , Link =  logit 
#
#Parameters of the mean component (trend):
#   beta 
#"3.538" 
#
#Parameters of the spatial component:
#   correlation function: matern
#          kappa =  3.8
#
#      (estimated) variance parameter sigmasq (partial sill) =  0.1334
#      (estimated) cor. fct. parameter phi (range parameter)  =  0
#
# (estimated) relative nugget =  0.7511
#
#
#Maximised Likelihood:
#   log.L n.params 
#"0.1942"      "4" 
#
#Call:
#likfit.glsm(mcmc.obj = OP2003Seppos.pre.lf, cov.model = "matern", 
#    kappa = 3.8, ini.phi = 90, fix.nugget.rel = FALSE, nugget.rel = 0, 
#    hessian = TRUE)
 
 
A R-user told me that "on accounf of the AIC results, your variable has a uniform distribution or aleatorially located in the space. Spacial correlation is null. Then, such a variable can be modelled as one of constant average through the space, it means that it doesn't depend on its locality". ... ...I wonder how it can be done in R.
 
I thank you in advance for your kindness.
 
Jimmy M. 		 	   		  
	[[alternative HTML version deleted]]

