similar to: GamSetup

Displaying 20 results from an estimated 9000 matches similar to: "GamSetup"

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
2007 Oct 05
2
question about predict.gam
I'm fitting a Poisson gam model, say model<-gam(a65tm~as.factor(day.week )+as.factor(week)+offset(log(pop65))+s(time,k=10,bs="cr",fx=FALSE,by=NA,m=1),sp=c( 0.001),data=dati1,family=poisson) Currently I've difficulties in obtaining right predictions by using gam.predict function with MGCV package in R version 2.2.1 (see below my syntax).
2002 Jan 28
6
Almost a GAM?
Hello: I sent this question the other day with the wrong subject heading and couple typos, with no response. So, here I go again, having made those corrections. I would like to estimate, for lack of a better description, a partially additive non-parametric model with the following structure: z~ f(x,y):w1 + g(x,y):w2 + e In other words, I'd like to estimate the marginals with respect to
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
2010 Jan 24
2
How to define degree=1 in mgcv
Hi, all I have a question on mgcv and ns. Now I want to compare the results from glm, gam and ns. Take a simple model y~x for example. glm1 = glm(y~x, data=data1) gam1 = gam(y~s(x), data=data1) ns1 = glm(y~ns(x),data=data1) In order to confirm the result from glm1 is consistent to those from gam1 and ns1, I want to define degree=1 in mgcv and ns. I am wondering if there is somebody can give me
2010 Jun 18
2
varIdent error using gam function in mgcv
Hello, As I am relatively new to the R environment this question may be either a) Really simple to answer b) Or I am overlooking something relatively simple. I am trying to add a VarIdent structure to my gam model which is fitting smoothing functions to the time variables year and month for a particular species. When I try to add the varIdent weights to variable Month I get this error returned.
2008 Nov 12
1
gam help (really a vegan question)
What does Generalized Cross Validation score mean. I preform and ordisurf on an ordination (nmds) with an environmental variable. I am trying to figure out "how well" the environmental varibles predict/explain the sites placements in species space. Any help would be greatly appreciated. Any pointers to literature... would be welcome. thanks in advance, -- Stephen Sefick Research
2009 Jun 18
3
predict.glm and predict.gam output
Hi all, I am currently trying to compare different plant occurrence prediction maps generated in R and exported into GRASS. One of these maps was generated from a glm fitted to some data, and subsequently applying this glm model to a wider region using predict.glm. The outcome here was a probability of occurrence. The second map I generated using a gam (mgcv), however, this map seems to have
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
2011 Oct 09
2
pdIdent in smoothing regression model
Hi there, I am reading the 2004 paper "Smoothing with mixed model software" in Journal of Statistical Software, by Ngo and Wand. I tried to run their first example in Section 2.1 using R but I had some problems. Here is the code: library(nlme) fossil <- read.table("fossil.dat",header=T) x <- fossil$age y <- 100000*fossil$strontium.ratio knots <-
2013 Apr 23
1
GAM Penalised Splines - Intercept
Hey all, I'm using the gam() function inside the mgcv package to fit a penalised spline to some data. However, I don't quite understand what exactly the intercept it includes by default is / how to interpret it. Ideally I'd like to understand what the intercept is in terms of the B-Spline and/or truncated power series basis representation. Thanks!
2010 Mar 04
2
which coefficients for a gam(mgcv) model equation?
Dear users, I am trying to show the equation (including coefficients from the model estimates) for a gam model but do not understand how to. Slide 7 from one of the authors presentations (gam-theory.pdf URL: http://people.bath.ac.uk/sw283/mgcv/) shows a general equation log{E(yi )} = ?+ ?xi + f (zi ) . What I would like to do is put my model coefficients and present the equation used. I am an
2010 Jun 07
2
mgcv
Hello Sir, I am using mgcv package for my data. My model is y~x1+f(x2),I want to find out the function f(x2) . Following is the code.   sm1=gam(y~x1+s(x2),family=binomial, f) summary(sm1) plot(sm1,residuals=TRUE, xlab="AGE",pch=20)   In this plot I am getting S(x2,1.93) on y axixs  How should I get the function for x2 from this plot.or Is there anyother procedure in R  to get this
2010 Oct 27
1
GAM function in mgcv package
Hi R-users I am trying to use the GAM function of the mgcv package. But I am having problem trying to specify the k parameter. Although I managed to run some models by giving to the parameter some (random) value, and it is explained by Wood (2006) that it does not seem to "really" affect the final result, I would like to grasp better its meaning. I understand that is the
2009 Dec 21
1
mgcv with discrete covariates, interaction term
I'm trying to build a model with an overall smooth function for all the data, plus an additional smooth function for *some* of the data. If "ind" is my indicator variable (0 for some x, 1 for others), I imagined I could write it like this: gam.obj <- gam(y ~ s(x) + ind*s(x)) but this does not work. Does mgcv have a way of doing this? If not directly, is there a reasonable
2010 Jun 04
1
package mgcv inconsistency in help files? cyclic P-spline "cs" not cyclic?
Dear all, I'm a bit stunned by the behaviour of a gam model using cyclic P-spline smoothers. I cannot provide the data, as I have about 61.000 observations from a time series. I use the following model : testgam <- gam(NO~s(x)+s(y,bs="cs")+s(DD,bs="cs")+s(TT),data=Final) The problem lies with the cyclic smoother I use for seasonal trends. The variable Final$y is a
2010 Dec 08
1
I want to get smoothed splines by using the class gam
Hi all, I try to interpolate a data set in the form: time Erg 0.000000 48.650000 1.500000 56.080000 3.000000 38.330000 4.500000 49.650000 6.000000 61.390000 7.500000 51.250000 9.000000 50.450000 10.500000 55.110000 12.000000 61.120000 18.000000 61.260000 24.000000 62.670000 36.000000 63.670000 48.000000 74.880000 I want to get smoothed splines by using the class gam The first way I tried , was
2009 Jun 23
1
Model fitting with GAM and "by" term
Hello R Users, I have a question regarding fitting a model with GAM{mgcv}. I have data from several predictor (X) variables I wish to use to develop a model to predict one Y variable. I am working with ecological data, so have data collected many times (about 20) over the course of two years. Plotting data independently for each date there appears to be relationships between Y (fish density)
2008 Nov 14
1
negative prediction by gam (mgcv package)
Hi Gam in mgcv package is predicting negative values which should not be the case despite all the predictors and response variables are positive. Tried to use log link function but it did not help. Please help sunil -- View this message in context: http://www.nabble.com/negative-prediction-by-gam-%28mgcv-package%29-tp20494965p20494965.html Sent from the R help mailing list archive at
2009 Aug 24
2
Formulas in gam function of mgcv package
Dear R-experts, I have a question on the formulas used in the gam function of the mgcv package. I am trying to understand the relationships between: y~s(x1)+s(x2)+s(x3)+s(x4) and y~s(x1,x2,x3,x4) Does the latter contain the former? what about the smoothers of all interaction terms? I have (tried to) read the manual pages of gam, formula.gam, smooth.terms, linear.functional.terms but