[R] help with gepRglm::likfit.glsm

ernesto ernesto at ipimar.pt
Fri Jan 13 12:24:53 CET 2006


Hi,

I'm exploring likfit.glsm and I need some help. I have to say that I'm
not an MCMC expert ...

I did a first run of likfit.glsm with S.scale=0.002 and it worked
whithout problems but there was strong autocorrelation and the chain
convergence for the ramdom effects was quite poor, so I changed S.scale
to 0.4, which gave acceptance rates close to 0.6 as proposed on the
documentation, and the autocorrelation and chain convergence was ok.
However when I tried to run likfit.glsm it gave the following error:

> gdn.glsm2.lf <- likfit.glsm(gdn.glsm2.prelf, cov.model =
"exponential", ini.phi=26, lambda=0)
--------------------------------------------------------------------
likfit.glsm: likelihood maximisation using the function optim.
phi =  26 tausq.rel =  0
Error in if (det(Delta2) != 0) { : missing value where TRUE/FALSE needed
In addition: Warning message:
cannot use argument lambda with the given objects in mcmc.obj in:
likfit.glsm(gdn.glsm2.prelf, cov.model = "exponential", ini.phi = 26,

below is the code for both runs.

Thanks

EJ

# first run

mod <- list(beta=gdn.lf$beta, cov.pars=gdn.lf$cov.pars,
cov.model=gdn.lf$cov.model, nugget=gdn.lf$nugget,
aniso.pars=gdn.lf$aniso.pars, family="poisson", lambda=gdn.lf$lambda)

mcc <- mcmc.control(S.scale=0.002)
gdn.glsm1 <- glsm.mcmc(gdn, model=mod, mcmc.input=mcc)
gdn.glsm1.prelf <- prepare.likfit.glsm(gdn.glsm1)
gdn.glsm1.lf <- likfit.glsm(gdn.glsm1.prelf, cov.model = "exponential",
ini.phi=26, lambda = 0)

# second run

mcc <- mcmc.control(S.scale=0.4)
gdn.glsm2 <- glsm.mcmc(gdn, model=mod, mcmc.input=mcc)
gdn.glsm2.prelf <- prepare.likfit.glsm(gdn.glsm2)
gdn.glsm2.lf <- likfit.glsm(gdn.glsm2.prelf, cov.model = "exponential",
ini.phi=26, lambda=0)




More information about the R-help mailing list