[R] help with gepRglm::likfit.glsm

Ruben Roa RRoa at fisheries.gov.fk
Fri Jan 13 12:00:23 CET 2006


> -----Original Message-----
> From:	r-help-bounces at stat.math.ethz.ch [SMTP:r-help-bounces at stat.math.ethz.ch] On Behalf Of ernesto
> Sent:	Friday, January 13, 2006 9:25 AM
> To:	Mailing List R
> Subject:	[R] help with gepRglm::likfit.glsm
> 
> 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,
-------------
Regarding the warning: the argument 'lambda' corresponds to the model for 
continuous variables (used in geoR) whereas you seem to have counts.
The error has occurred to me when i try to fit a spatial correlation function 
that the data does not support. For example when i try to fit the matern model
with too few observations. Then i fall back into exponential or gaussian and
then the error disappears. Try fitting the gaussian. Also try changing the initial
values for the correlation distance.
Ruben




More information about the R-help mailing list