[R-sig-Geo] Spatial and multilevel model with kriging/interpolation in R

Justice Moses K. Aheto justiceaheto at yahoo.com
Thu Sep 25 21:40:38 CEST 2014


Hello Thierry and Frede,
Many thanks for your assistance and I do appreciate it very much and I will have a look at inla as suggested.
Frede, I know how to fit the model in nlme package using lme but the major problem is how to use the model in lme for kriging and interpolation for on a grid/mesh. The model I fitted in lme last week Monday is shown below: 

m1 <- lme(haz2 ~m5newf+v445new+hw1new+v012+v190newf+b0new+v481new+m18new, random = ~ 1|hhid, method="ML",data = d1) # Multilevel model (no spatial component)
plot(Variogram(m1,form=~x+y)) # Plotting the variogram from the above model

# Updating my model with spatial autocorrelation using Gaussian spatial correlation. I have tried Gaussian,exponential and spherical spatial correlation and the Gaussian fits my data better (shown below): 

spg <- update(m1, correlation = corGaus(value=c(2000,0.6),form = ~ x+ y,nugget=T)) # initial values for range and nugget effects are 2000 and 0.6 respectively. 
summary(spg)
plot(Variogram(spg,form=~x+y)) # Plotting the variogram 

>From here, I need to use the spatial model above (spg) to do the kriging/interpolation on a grid (mesh) to be obtained from my data and I struggling to find my way out of it as of last week Monday 15th Sept.
The size of my data is too large if not I would have attached it for the purpose of reproducibility. 
I will definitely have a look also at INLA as suggested and I am looking forward to more suggestions. 
Many thanks to you All. 
 
Kind regards

*****************************************
Justice Moses K. Aheto
PhD Candidate in Medicine (United Kingdom)
MSc Medical Statistics (United Kingdom)
BSc Statistics (Ghana)
HND Statistics (Ghana)

Chief Executive Officer
Statistics and Analytics Consultancy Services Ltd.

Skype: jascall12
Mobile: +447417589148.
	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list