[R] help with gepRglm::likfit.glsm

From: ernesto <ernesto_at_ipimar.pt>
Date: Fri 13 Jan 2006 - 22:24:53 EST


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.



# 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)

R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri Jan 13 22:40:56 2006

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:42:03 EST