[R] mcv package gamm function Error in chol(XVX + S)
Simon Wood
s.wood at bath.ac.uk
Wed Oct 3 15:15:24 CEST 2007
Dae-Jin,
Thanks for your (offline) persistance: you are right the problem is with
`gamm'. There was a dimension dropping error in `formXtViX' (called by
`gamm') for group sizes of 1 (as occurs when you have a random effect per
observation). This will be fixed in mgcv_1.3-28.
best,
Simon
On Tuesday 02 October 2007 15:50, Dae-Jin Lee wrote:
> Hi all R users !
>
> 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