similar to: gam() (in mgcv) with multiple interactions

Displaying 20 results from an estimated 7000 matches similar to: "gam() (in mgcv) with multiple interactions"

2007 Jun 21
1
mgcv: lowest estimated degrees of freedom
Dear list, I do apologize if these are basic questions. I am fitting some GAM models using the mgcv package and following the model selection criteria proposed by Wood and Augustin (2002, Ecol. Model. 157, p. 157-177). One criterion to decide if a term should be dropped from a model is if the estimated degrees of freedom (EDF) for the term are close to their lower limit. What would be the
2012 Jul 30
2
mgcv 1.7-19, vis.gam(): "invalid 'z' limits'
Hi everyone, I ran a binomial GAM consisting of a tensor product of two continuous variables, a continuous parametric term and crossed random intercepts on a data set with 13,042 rows. When trying to plot the tensor product with vis.gam(), I get the following error message: Error in persp.default(m1, m2, z, col = col, zlim = c(min.z, max.z), xlab = view[1], : invalid 'z' limits In
2013 Aug 23
1
Setting up 3D tensor product interactions in mgcv
Hi, I am trying to fit a smoothing model where there are three dimensions over which I can smooth (x,y,z). I expect interactions between some, or all, of these terms, and so I have set up my model as mdl <- gam(PA ~ s(x) + s(y) + s(z) + te(x,y) + te(x,z) + te(y,z) + te(x,y,z),...) I have recently read about the ti(), "tensor product interaction smoother", which takes care of these
2012 Apr 02
1
gamm: tensor product and interaction
Hi list, I'm working with gamm models of this sort, using Simon Wood's mgcv library: gm<- gamm(Z~te(x,y),data=DATA,random=list(Group=~1)) gm1<-gamm(Z~te(x,y,by=Factor)+Factor,data=DATA,random=list(Group=~1)) with a dataset of about 70000 rows and 110 levels for Group in order to test whether tensor product smooths vary across factor levels. I was wondering if comparing those two
2018 Jan 17
1
mgcv::gam is it possible to have a 'simple' product of 1-d smooths?
I am trying to test out several mgcv::gam models in a scalar-on-function regression analysis. The following is the 'hierarchy' of models I would like to test: (1) Y_i = a + integral[ X_i(t)*Beta(t) dt ] (2) Y_i = a + integral[ F{X_i(t)}*Beta(t) dt ] (3) Y_i = a + integral[ F{X_i(t),t} dt ] equivalents for discrete data might be: 1) Y_i = a + sum_t[ L_t * X_it * Beta_t ] (2) Y_i
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
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
2005 Mar 11
0
mgcv 1.2-0
mgcv version 1.2 is on CRAN now. mgcv provides generalized additive models and generalized additive mixed models with automatic estimation of the smoothness of model components. Changes in this version are: * A new gam fitting method is implemented for the generalized case. It provides more reliable convergence than the previous default, but can be a little slower. See ?gam.method,
2005 Mar 11
0
mgcv 1.2-0
mgcv version 1.2 is on CRAN now. mgcv provides generalized additive models and generalized additive mixed models with automatic estimation of the smoothness of model components. Changes in this version are: * A new gam fitting method is implemented for the generalized case. It provides more reliable convergence than the previous default, but can be a little slower. See ?gam.method,
2012 Feb 13
3
mgcv: increasing basis dimension
hi Using a ts or tprs basis, I expected gcv to decrease when increasing the basis dimension, as I thought this would minimise gcv over a larger subspace. But gcv increased. Here's an example. thanks for any comments. greg #simulate some data set.seed(0) x1<-runif(500) x2<-rnorm(500) x3<-rpois(500,3) d<-runif(500) linp<--1+x1+0.5*x2+0.3*exp(-2*d)*sin(10*d)*x3
2012 Jul 11
2
Modifying the design matrix X in GAMS to suit data assimilation
I have a data assimilation problem that might be amenable to the use of GAMS, but I am not sure how feasible it is to implement. I was told the R mailing list was a great resource. My observations are spatiotemporal salinity in the San Francisco Bay at a number of instruments over a few days. The thing that I want to fit is the initial condition for a salt transport model at the beginning of this
2004 Mar 16
0
mgcv 1.0
mgcv 1.0 (package providing gams etc) will be released with R 1.9.0. (R 1.8.x compatible versions can be found at: http://www.stats.gla.ac.uk/~simon/simon/mgcv.html) There are quite a few changes from mgcv 0.9: hence this message. The main new features are: * A generalized additive mixed modelling function `gamm' (which uses lme from the nlme library of glmmPQL from the MASS library for
2004 Mar 16
0
mgcv 1.0
mgcv 1.0 (package providing gams etc) will be released with R 1.9.0. (R 1.8.x compatible versions can be found at: http://www.stats.gla.ac.uk/~simon/simon/mgcv.html) There are quite a few changes from mgcv 0.9: hence this message. The main new features are: * A generalized additive mixed modelling function `gamm' (which uses lme from the nlme library of glmmPQL from the MASS library for
2006 Nov 07
1
gamm(): nested tensor product smooths
I'd like to compare tests based on the mixed model representation of additive models, testing among others y=f(x1)+f(x2) vs y=f(x1)+f(x2)+f(x1,x2) (testing for additivity) In mixed model representation, where X represents the unpenalized part of the spline functions and Z the "wiggly" parts, this would be: y=X%*%beta+ Z_1%*%b_1+ Z_2%*%b_2 vs y=X%*%beta+ Z_1%*%b_1+ Z_2%*%b_2 + Z_12
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
2012 Jul 30
1
te( ) interactions and AIC model selection with GAM
Hello R users, I'm working with a time-series of several years and to analyze it, I?m using GAM smoothers from the package mgcv. I?m constructing models where zooplankton biomass (bm) is the dependent variable and the continuous explanatory variables are: -time in Julian days (t), to creat a long-term linear trend -Julian days of the year (t_year) to create an annual cycle - Mean temperature
2011 Sep 20
2
Multivariate spline regression and predicted values
Hello, I am trying to estimate a multivariate regression of Y on X with regression splines. Y is (nx1), and X is (nxd), with d>1. I assume the data is generated by some unknown regression function f(X), as in Y = f(X) + u, where u is some well-behaved regression error. I want to estimate f(X) via regression splines (tensor product splines). Then, I want to get the predicted values for some new
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)
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
2012 Oct 27
0
[gam] [mgcv] Question in integrating a eiker-white "sandwich" VCV estimator into GAM
Dear List, I'm just teaching myself semi-parametric techniques. Apologies in advance for the long post. I've got observational data and a longitudinal, semi-parametric model that I want to fit in GAM (or potentially something equivalent), and I'm not sure how to do it. I'm posting this to ask whether it is possible to do what I want to do using "canned" commands