[R] geoRglm with factor variable as covariable

Filoche pmassicotte at hotmail.com
Thu Oct 4 21:39:52 CEST 2012

Dear R users.

I'm trying to fit  a generalised linear spatial mode using the geoRglm
package. To do so, I'm preparing my data (geodata) as follow:

geoData9093 = as.geodata(data9093, coords.col= 17:18, data.col=15,*

where covar.col is a factor variable (years in this case 90-91-92-93)).

Then I run the model as follow:
model.5 = list(cov.pars=c(1,1), cov.model='exponential', beta=1,
mcmc.5 = mcmc.control(S.scale = 0.25, n.iter = 30000, burn.in=50000, thin =
100) #trial error
outmcmc.5 = glsm.mcmc(geoData9093, model= model.5, mcmc.input = mcmc.5)     
mcmcobj.5 = prepare.likfit.glsm(outmcmc.5)   
lik.5 = likfit.glsm(mcmcobj.5, ini.phi = 0.3, fix.nugget.rel = F)/

And the summary of lik.5 is:

likfit.glsm: estimated model parameters:
     beta   sigmasq       phi tausq.rel 
 "1.2781"  "0.5193"  "0.0977"  "0.0069" 

 likfit.glsm : maximised log-likelihood = 43.62

I'm fairly new to geostatistics, but I thought using a factor variable as
covariable would give me 4 intercepts (beta) as I have 4 levels in my covar.
But looking at the summary, we see that I only have 1 beta which is equal to
1.28. I guess I made mistakes in specifying the model description, but I
can't find where. Any advices would be welcome.

With regards,

View this message in context: http://r.789695.n4.nabble.com/geoRglm-with-factor-variable-as-covariable-tp4645067.html
Sent from the R help mailing list archive at Nabble.com.

More information about the R-help mailing list