[R-sig-Geo] Model Based geostatistics and covariance models
Nicola Batchelor
N.A.Batchelor at sms.ed.ac.uk
Wed Apr 1 13:37:19 CEST 2009
Dear list,
I'm using geoRglm with the log link function and a number of covariates.
I'm having convergence and mixing problems with my MCM algorithms and my
supervisors and I have come up with a few suggestions for what the problem
could be (I'm a novice geostatistician and R-user). I was wondering if
someone could perhaps answer a couple of general questions about one theory?
Firstly, if the covariance model specified in model.glm.control does not fit
the data adequately is this likely to result in convergence/mixing problems?
And secondly, what impact could this have on the model results?
My supervisor suggested trying to use only the short lags in model fitting
as the tail of my variogram does not fit well to the specified covariance
function - is this possible in geoRglm? Could I use only lags up to 30km
and discard lags from 30 to 60km (max lag is about 60km in my dataset)?
My data shows a 'hole-effect' so the variogram rises, and then drops again,
but I have been using the spherical covariance function in my model fitting
which fits my data up to the peak, but not after. So far I have been unable
to find a better fitting line for my data using lines.variomodel. I'm not
sure if this is useful or not, but I have included my code below (nicola1 is
the dataset and MARKET is a covariate).
Any advice or suggestions would be appreciated,
Many thanks,
Nicola
varA<-variog(nicola1, trend=~MARKET, max.dist=30,uvec=15)
plot(varA)
lines.variomodel(cov.model="sph", cov.pars = c(1.2, 20), nug=0.8,
max.dist=30)
#Set a random seed
set.seed(548)
#Set the prior control
PriA<-prior.glm.control(beta.prior="flat", sigmasq.prior="uniform",
phi.prior="fixed", phi =20, tausq.rel=1)
#Set the MCMC control
McA<-mcmc.control(S.scale=0.03, phi.scale=0.36, burn.in=100000, thin=50,
n.iter=100000)
#Set the model control
ModA<-model.glm.control(trend.d=trend.spatial(~MARKET, nicola1),
cov.model="spherical", lambda=0)
#Set the output control
OutA<-output.glm.control(sim.posterior=TRUE, keep.mcmc.sim=TRUE,
quantile=TRUE, inference=TRUE)
#Run the model with inputs (prior control, MCMC control, trend
specification, model control, and output control)
testA<-binom.krige.bayes(nicola1, prior=PriA, model=ModA, mcmc.input=McA,
output=OutA)
save(testA, file="test1")
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20090401/0067c69e/attachment.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20090401/0067c69e/attachment.pl>
More information about the R-sig-Geo
mailing list