[R-sig-Geo] Spatial model in geoRglm

Catherine Linard linard at geog.ucl.ac.be
Wed Jan 24 12:25:12 CET 2007


Hello,

I'm trying to use the geoRglm package to perform a Poisson spatial 
model. I looked at all commands in the package and I have some 
methodological and technical questions.

Firstly, if I understand well, there are two ways to perform a 
spatial regression with generalized linear models in geoRglm: (i) 
with bayesian methods with the 'pois.krige.bayes' procedure or (ii) 
with a Monte Carlo Maximum Likelihood estimation, with the 
'likfit.glsm' procedure. As I'm not used to work with Bayesian 
methods, I prefer the second method but get some error messages that 
I don't understand.

Here are my codes for a Poisson spatial model with 4 covariates:

 > lyme <- read.csv("Lyme.csv",header=TRUE,sep=";",dec=",")
 > geolyme <- as.geodata(lyme,coords.col = 2:3, data.col = 4, 
covar.col = 7:10, units.m.col = 6,borders = TRUE)
 > trend <- trend.spatial("1st", geolyme, add=~COV1+COV2+COV3+COV4)
 > mcmc <- mcmc.control(S.scale=0.00000004, thin=1,phi.scale=0.5) # 
S.scale was chosen to get an Acc.-rate close to 0.60.
 > glsmmcmc <- glsm.mcmc (geolyme, coords=geolyme$coords, 
data=geolyme$data, units.m=geolyme$units.m, model=list (trend=trend, 
beta=c(1,1,1,1,1,1,1), cov.pars=c(1,1), link="log", 
family="poisson"), mcmc.input=mcmc,messages=T)

iter. numb. 1000  : Acc.-rate =  0.589
MCMC performed: n.iter. =  1000 ; thinning =  1 ; burn.in =  0

 > mcmcobj <- prepare.likfit.glsm(glsmmcmc)
 > lik.1 <- likfit.glsm(mcmcobj,ini.phi=0.1)
--------------------------------------------------------------------
likfit.glsm: likelihood maximisation using the function optim.
phi =  0.1 tausq.rel =  0
    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.
       0       0      0     Inf     Inf    Inf
Erreur dans .func.val(SivS, SivD, DivD, beta.hat[ll, ], sigmasq.hat[ll],  :
         Some function values are not finite

Any suggestions on how to resolve this problem will be appreciated. I 
hope that I'm not completely wrong. Otherwise, I will also appreciate 
examples of codes that implement a Poisson spatial regression model 
with different covariates in geoRglm.

Thank you very much for any help,


Catherine Linard
University of Louvain
Department of Geography
Place Pasteur, 3
B - 1348 Louvain-la-Neuve
BELGIUM

Tel: +32/10/47.28.67
Fax: +32/10/47.28.77
e-mail: linard at geog.ucl.ac.be
http://www.geo.ucl.ac.be/Recherche/Teledetection/integrated_studies.html




More information about the R-sig-Geo mailing list