[R] mcv package gamm function Error in chol(XVX + S)
Simon Wood
s.wood at bath.ac.uk
Tue Oct 2 17:23:41 CEST 2007
Well, it's certainly a problem detected by gamm, but whether it's a
fundamental statistical problem with this model/data combination or something
fixable by taking an alternative approach within gamm I can't tell. Would you
be able to send me the data used here (I promise not to use it for anything
else, of course), so I can figure out where the problem is?
best,
Simon
> I'm using gamm function from Simon Wood's mgcv package, to fit a spatial
> regression Generalized Additive Mixed Model, as covariates I have the
> geographical longitude and latitude locations of indexed data. I include a
> random effect for each district (dist) so the code is
>
> fit <- gamm(y~s(lon,lat,bs="tp", m=2)+offset(log(exp.)),
> random=list(dist=~1), family="poisson", niterPQL=30)
>
> when I run the gamm function I obtain the next error message:
>
> %%%
> Maximum number of PQL iterations: 30
> iteration 1
> iteration 2
> ...
> iteration 8
> iteration 9
> iteration 10
> Error in chol(XVX + S) : the leading minor of order 29 is not positive
> definite
> %%%
>
> Could be any problem in gamm() ???
>
> --
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html and provide commented, minimal,
> self-contained, reproducible code.
--
> Simon Wood, Mathematical Sciences, University of Bath, Bath, BA2 7AY UK
> +44 1225 386603 www.maths.bath.ac.uk/~sw283
More information about the R-help
mailing list