similar to: how to debug a sudden exit in non-interactive mode

Displaying 20 results from an estimated 10000 matches similar to: "how to debug a sudden exit in non-interactive mode"

2008 Oct 01
1
Simon Wood GAMsetup
Dear Simon, Thank you for your quick reply! I used to perform the GAMsetup in the following manner: GAMsetup sintax: x.summer: vector used for construct the spline knots<-14 N<-length(x.summer) x<-array(x.summer,dim=c(1,N)) G<-list(m=1,n=N,nsdf=0,df=knots+1,dim=1,s.type=0,by=0,by.exists=FALSE,p.order=0,x=x,n.knots=knots,fit.method="mgcv") H<-GAMsetup(G) with the
2012 Nov 29
1
[mgcv][gam] Manually defining my own knots?
Dear List, I'm using GAMs in a multiple imputation project, and I want to be able to combine the parameter estimates and covariance matrices from each completed dataset's fitted model in the end. In order to do this, I need the knots to be uniform for each model with partially-imputed data. I want to specify these knots based on the quantiles of the unique values of the non-missing
2010 Dec 14
2
Use generalised additive model to plot curve
Readers, I have been reading 'the r book' by Crawley and think that the generalised additive model is appropriate for this problem. The package 'gam' was installed using the command (as root) install.package("gam") ... library(gam) > library(gam) Loading required package: splines Loading required package: akima > library(mgcv) This is mgcv 1.3-25 Attaching
2005 Nov 23
1
1st derivative {mgcv} gam smooth
Dear R-hep, I'm trying to get the first derivative of a smooth from a gam model like: model<-gam(y~s(x,bs="cr", k=5)+z) and need the derivative: ds(x)/dx. Since coef(model) give me all the parameters, including the parameters of the basis, I just need the 1st derivative of the basis s(x).1, s(x).2, s(x).3, s(x).4. If the basis were generated with the function
2011 Mar 28
2
mgcv gam predict problem
Hello I'm using function gam from package mgcv to fit splines. ?When I try to make a prediction slightly beyond the original 'x' range, I get this error: > A = runif(50,1,149) > B = sqrt(A) + rnorm(50) > range(A) [1] 3.289136 145.342961 > > > fit1 = gam(B ~ s(A, bs="ps"), outer.ok=TRUE) > predict(fit1, newdata=data.frame(A=149.9), outer.ok=TRUE) Error
2007 Jun 11
1
Error using mgcv package
Hi all, I need some solution in the following problem. The following error appears when i use "mgcv" package for implementing GAM. But the same formula works fine in "gam" package. > model.gam <- gam(formula = RES ~ > CAT01+s(NUM01,5)+CAT02+CAT03+s(NUM02,5)+CAT04+ + CAT05+s(NUM03,5)+CAT06+CAT07+s(NUM04,5)+CAT08+s(NUM05,5)+CAT09+ +
2013 Jan 28
2
Why are the number of coefficients varying? [mgcv][gam]
Dear List, I'm using gam in a multiple imputation framework -- specifying the knot locations, and saving the results of multiple models, each of which is fit with slightly different data (because some of it is predicted when missing). In MI, coefficients from multiple models are averaged, as are variance-covariance matrices. VCV's get an additional correction to account for how
2010 Jun 03
4
gam error
Hi all, I'm trying to use a gam (mgcv package) to analyse some data with a roughly U shaped curve. My model is very simple with just one explanatory variable: m1<-gam(CoT~s(incline)) However I just keep getting the error message "Error in smooth.construct.tp.smooth.spec(object, dk$data, dk$knots) : A term has fewer unique covariate combinations than specified maximum degrees of
2010 Aug 04
2
more questions on gam/gamm(mgcv)...
Hi R-users, I'm using R 2.11.1, mgcv 1.6-2 to fit a generalized additive mixed model. I'm new to this package...and just got more and more problems... 1. Can I include correlation and/or random effect into gam( ) also? or only gamm( ) could be used? 2. I want to estimate the smoothing function s(x) under each level of treatment. i.e. different s(x) in each level of treatment. shall I
2007 Dec 13
1
Probelms on using gam(mgcv)
Dear all, Following the help from gam(mgcv) help page, i tried to analyze my dataset with all the default arguments. Unfortunately, it can't be run successfully. I list the errors below. #m.gam<-gam(mark~s(x,y)+s(lstday2004)+s(slope)+s(ndvi2004)+s(elevation)+s(disbinary),family=binomial(logit),data=point)
2007 Jun 25
1
gam function in the mgcv library
I would like to fit a logistic regression using a smothing spline, where the spline is a piecewise cubic polynomial. Is the knots option used to define the subintervals for each piece of the cubic spline? If yes and there are k knots, then why does the coefficients field in the returned object from gam only list k coefficients? Shouldn't there be 4k -4 coefficients? Sincerely, Bill
2007 Oct 17
1
Error message in GAM
Hello useRs! I have % cover data for different plant species in 300 plots, and I use the ARCSINE transformation (to deal with % cover data). When I use a GLM I do not have any problem. But when I am trying to use a GAM model using mgcv package, to account for non-linearity I get an ?error message?. I use the following model: sp1.gam<-gam(asin(sqrt(0.01*SP1COVER))~
2009 Sep 20
1
How to choose knots for GAM?
Hi, all I want to choose same knots in GAM for 10 different studies so that they has the same basis function. Even though I choose same knots and same dimensions of basis smoothing, the basis representations are still not same. My command is as follows: data.gam<-gam(y~s(age,bs='cr',k=10)+male,family=binomial,knots=list(age=seq(45,64,length=10))) What is my mistake for choice of
2009 Oct 13
2
How to choose a proper smoothing spline in GAM of mgcv package?
Hi, there, I have 5 datasets. I would like to choose a basis spline with same knots in GAM function in order to obtain same basis function for 5 datasets. Moreover, the basis spline is used to for an interaction of two covarites. I used "cr" in one covariate, but it can only smooth w.r.t 1 covariate. Can anyone give me some suggestion about how to choose a proper smoothing spline
2013 Jan 17
2
Explore patterns with GAM
Dear all, I new to r and I would like your help. I want to explore the patterns (unimodal, monotonically increased/decreased) of species richness~altitude using GAM in R. Although I run the gam function in mgcv package I do not know how to manually define knots and degrees of freedom. Any help would be greatly appreciated. Spyros -- View this message in context:
2011 Nov 08
3
GAM
Hi R community! I am analyzing the data set "motorins" in the package "faraway" by using the generalized additive model. it shows the following error. Can some one suggest me the right way? library(faraway) data(motorins) motori <- motorins[motorins$Zone==1,] library(mgcv) >amgam <- gam(log(Payment) ~ offset(log(Insured))+ s(as.numeric(Kilometres)) + s(Bonus) + Make +
2006 Aug 15
1
Grasper model error
I tried this over a the grasp users yahoo group and got no response....So I wonder if anyone here knows about grasper I keep getting this error when trying to run a model. Error in smooth.construct.tp.smooth.spec(object, data, knots) : Too many knots for t.p.r.s term: see `gam.control' to increase limit, or use a different basis, or see large data set help for `gam'. I'm using
2009 Mar 04
1
help with GAM
Hi I'm trying to do a GAM analysis and have the following codes entered into R (density is = sample number, alive are the successes) density<-as.real(density) y<-cbind(alive,density-alive) library(mgcv) m1<-gam(y~s(density),binomial) at which point I get the following error message Error in smooth.construct.tp.smooth.spec(object, dk$data, dk$knots) : A term has fewer unique
2006 Jun 18
1
GAM selection error msgs (mgcv & gam packages)
Hi all, My question concerns 2 error messages; one in the gam package and one in the mgcv package (see below). I have read help files and Chambers and Hastie book but am failing to understand how I can solve this problem. Could you please tell me what I must adjust so that the command does not generate error message? I am trying to achieve model selection for a GAM which is required for
2013 Jul 23
1
Help with using unpenalised te smooth in negative binomial mgcv gam
Hi, I have been trying to fit an un-penalised gam in mgcv (in order to get more reliable p-values for hypothesis testing), but I am struggling to get the model to fit sucessfully when I add in a te() interaction. The model I am trying to fit is: gam(count~ s(x1, bs = "ts", k = 4, fx = TRUE) + s(x2, bs = "ts", k = 4, fx = TRUE) + te(x2, x3, bs =