Christy Meredith
2011-Oct-28 22:19 UTC
[R] problem with glsm.krige: trendd and trend l must have similar specifications error
Hello, I used glsm.mcmc and likfit.glsm to create model. Now I want to predict at different locations, but I can't get glsm.krige to work. I keep getting the error that trend.d and trend.l must have similar specifications. I have tried numerous ways to include the covariates in the glsm.krige model, and I keep getting the same error message. The bolded part is the part that doesn't work. Any help would be appreciated! reddmcmc=glsm.mcmc(geodata, coords=geodata$coords, data=geodata$data,model=list(family="poisson", cov.pars=c(50,8000),beta=c(-26,-.04,6.94),cov.model="spherical",nugget=5,trend=~powerb1+temp1),mcmc.input = mcmc.control(S.scale =.000001 ,thin=10)) prepareredd1=prepare.likfit.glsm(reddmcmc) lik.redd1.1 <- likfit.glsm(prepareredd1, ini.phi = 10,cov.model = "spherical",trend=~powerb1 + temp1) # predict at new locations trendpred=trend.spatial(~habitat2$powerb + habitat2$avgtemp) test2 <- glsm.krige(reddmcmc,coords,trend.l=trendpred) # trend.d and trend.l must have similar specifications ????? test2 <- glsm.krige(reddmcmc,coords,trend.l=habitat2$powerb + habitat2$avgtemp) # same error message... [[alternative HTML version deleted]]