Dear All,

I want to do regression kriging using 7 covariates of which 2 are
categorical and 5 are numerical. I am doing regression on these variables
using the lm() that is not in a spatial setting. then i applied the
regression model to the unobserved locations. then i will do simple kriging
on the residuals. Please find script below

Questions
1. is the equation in the lm() good?
2.In the landcover i have 5 classes and in the soilmap i have 12
categories but in the  summary(clay.fit) result i am seeing 4 and 11 classes
respectively.  Is this correct

#converting to factors
landcover.f <- factor(m$landcover)
soilmap.f <- factor(m$soilmap)

# define the linear model by ordinary least squares prediction
clay.fit = lm(m$logclay~ m$logdem + m$evi + m$logtri + m$logtwi + m$logslope
+ landcover.f + soilmap.f, data=m)
 summary(clay.fit)

#apply regression model to all unobserved locations
clay.ols=9.182e+00+4.076e-02*m$logdem+2.482e-05*m$evi+-3.513e-01*m$logtri+-2.038e+00*m$logtwi+4.873e-01*m$logslope+-8.398e-01*landcover.f2+-9.969e-01*landcover.f3+-8.193e-01*landcover.f4+-8.814e-01*landcover.f5+2.616e-01*soilmap.f31+7.210e-01*soilmap.f35+-5.957e-01*soilmap.f36+-4.094e-01*soilmap.f37+-1.024e-01*soilmap.f38+-5.397e-01*soilmap.f39+-6.934e-01*soilmap.f140+-5.020e-01*soilmap.f141+-5.918e-01*soilmap.f42+-4.168e-01*soilmap.f43+-6.978e-01*soilmap.f44

 or
clay.ols=9.182e+00+4.076e-02*m$logdem+2.482e-05*m$evi+-3.513e-01*m$logtri+-2.038e+00*m$logtwi+4.873e-01*m$logslope+-8.398e-01*clay.fit$landcover.f2+-9.969e-01*clay.fit$landcover.f3+-8.193e-01*clay.fit$landcover.f4+-8.814e-01*clay.fit$landcover.f5+2.616e-01*clay.fit$soilmap.f31+7.210e-01*clay.fit$soilmap.f35+-5.957e-01*clay.fit$soilmap.f36+-4.094e-01*clay.fit$soilmap.f37+-1.024e-01*clay.fit$soilmap.f38+-5.397e-01*clay.fit$soilmap.f39+-6.934e-01*clay.fit$soilmap.f140+-5.020e-01*clay.fit$soilmap.f141+-5.918e-01*clay.fit$soilmap.f42+-4.168e-01*clay.fit$soilmap.f43+-6.978e-01*clay.fit$soilmap.f44

I am not getting results, can anyone help .
Regards, Nikki

	[[alternative HTML version deleted]]

