On Sun, Oct 7, 2012 at 3:00 PM, garth <dbo...@dal.ca> wrote: > Hello, > > I'm running a multimodel analysis which involves fitting several GAM models > as implemented in package mgcv. The issue I'm having is that when I try to > fit my model, gam gives me the following error message: 'Error in > initial.sp(w * X, S, off) : S[[2]] matrix is not +ve definite.' The strange > part of this is that the error message stops my model fitting function when > run on a linux platform, but not on my local windows machine. Ordinarily I > would just run the analysis on my local machine, but I need to run this from > the linux machine to take advantage of the much larger computing capacity. > The version of mgcv(1.7-21) and R (2.15.1) is the same on both machines. > > The data set to which the model if fitted is too large to post here but it > contains 2209 observations, and the model is of the form: gam(Response~Year > + s(Dayofyear,k=5,bs='cc') + s(Longitude,Latitude,k=4) + > s(Coast_distance,k=4), family=Gamma('log'), data=dat, gamma=1.4) > > I realize this is a very particular question, but any help would be really > appreciated. > Thanks, > Dan. >
It's a bit of a shot in the dark, but might it reflect data that is "close" to not being non-positive-definite and differences in BLAS? The only other think I'd try would be a update.packages(checkBuilt = TRUE, ask = FALSE) to just update every package you've got installed. It might not be that the error is from mgcv proper, but rather a dependency thereof which is in different versions between the machines. Also, I note you're posting through Nabble. Nabble actually only mirrors the R-Help mailing list, so we (the majority of respondents who don't use Nabble) don't get a forum view, but rather only emails of individual posts. The net result of this is that we don't see context of your follow-up postings unless you specifically include it, but it's much appreciated if you do. I believe there might also be a button which does so automatically, but I'll leave finding that to you. Cheers, Michael ______________________________________________ R-help@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.