similar to: Comparing GAMMs

Displaying 20 results from an estimated 3000 matches similar to: "Comparing GAMMs"

2010 May 28
1
Comparing and Interpreting GAMMs
Dear R users I have a question related to the interpretation of results based on GAMMs using Simon Woods package gamm4. I have repeated measurements (hours24) of subjects (vpnr) and one factor with three levels (pred). The outcome (dv) is binary. In the first model I'd like to test for differences among factor levels (main effects only): gamm.11<-gamm4(dv ~ pred +s(hours24), random = ~
2009 Nov 19
2
Calling R (GAMM) from Fortran
Hello,   I am currently working on a modeling project using Fortran to run large repetitive loops (many DO loops). As part of this process I would like to use a model fit in R and currently stored as an R object. This is a rather complex model, a GAMM, and I am curious whether there is a way to call this model from Fortran. I am not sure "call" is correct terminology, but I
2009 Nov 21
1
3-D Plotting of predictions from GAM/GAMM object
Hello all, Thank you for the previous assistance I received from this listserve! My current question is: How can I create an appropriate matrix of values from a GAM (actually a GAMM) to make a 3-D plot? This model is fit as a tensor product spline of two predictors and I have used it to make specific predictions by calling:
2009 May 18
1
Predicting complicated GAMMs on response scale
Hi, I am using GAMMs to show a relationship of temperature differential over time with a model that looks like this:- gamm(Diff~s(DaysPT)+AirToC,method="REML") where DaysPT is time in days since injury and Diff is repeat measures of temperature differentials with regards to injury sites compared to non-injured sites in individuals over the course of 0-24 days. I use the following
2010 Jan 26
1
AIC for comparing GLM(M) with (GAM(M)
Hello I'm analyzing a dichotomous dependent variable (dv) with more than 100 measurements (within-subjects variable: hours24) per subject and more than 100 subjects. The high number of measurements allows me to model more complex temporal trends. I would like to compare different models using GLM, GLMM, GAM and GAMM, basically do demonstrate the added value of GAMs/GAMMs relative to
2008 Nov 15
1
GAMs and GAMMS with correlated acoustic data
Greetings This is a long email. I'm struggling with a data set comprising 2,278 hydroacoustic estimates of fish biomass density made along line transects in two lakes (lakes Michigan and Huron, three years in each lake). The data represent lakewide surveys in each year and each data point represents the estimate for a horizontal interval 1 km in length. I'm interested in comparing
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
2010 Jul 21
3
Interactions in GAMMs
Hi, I've an issue adding an interaction to a GAMM: My model was of form: gamm1 <- gamm(TOTSR ~ fROT + s(PH) + s(LOI) + s(ASP) + s(SQRT_ELEV) + CANCOV + s(SQRT_TOTCWD) + s(WELLF) + s(WELLN) + s(OLDWDLD) + s(DISTWOOD) + s(Annprec) + s(OLDWDLD:DISTWOOD) + (1|fSITE), family = poisson, data = BIOFOR2) with interaction of s(OLDWDLD:DISTWOOD). However I got this error message below but
2012 Aug 08
1
mgcv and gamm4: REML, GCV, and AIC
Hi, I've been using gamm4 to build GAMMs for exploring environmental influences on genetic ancestry. Things have gone well and I have 2 very straightforward questions: 1. I've used method=REML. Am I correct that this is an alternative method for estimating the smooth functions in GAMMs rather than GCV that is often used for GAMs? I've read up on REML and it makes sense, but I'm
2008 Nov 19
2
GAMM and anove.lme question
Greetings all The help file for GAMM in mgcv indicates that the log likelihood for a GAMM reported using summary(my.gamm$lme) (as an example) is not correct. However, in a past R-help post (included below), there is some indication that the likelihood ratio test in anova.lme(mygamm$lme, mygamm1$lme) is valid. How can I tell if anova.lme results are meaningful (are AIC, BIC, and logLik
2010 Jun 16
3
mgcv, testing gamm vs lme, which degrees of freedom?
Dear all, I am using the "mgcv" package by Simon Wood to estimate an additive mixed model in which I assume normal distribution for the residuals. I would like to test this model vs a standard parametric mixed model, such as the ones which are possible to estimate with "lme". Since the smoothing splines can be written as random effects, is it correct to use an (approximate)
2009 May 27
1
Deviance explined in GAMM, library mgcv
Dear R-users, To obtain the percentage of deviance explained when fitting a gam model using the mgcv library is straightforward: summary(object.gam) $dev.expl or alternatively, using the deviance (deviance(object.gam)) of the null and the fitted models, and then using 1 minus the quotient of deviances. However, when a gamm (generalizad aditive mixed model) is fitted, the
2011 Mar 17
2
fitting gamm with interaction term
Hi all, I would like to fit a gamm model of the form: Y~X+X*f(z) Where f is the smooth function and With random effects on X and on the intercept. So, I try to write it like this: gam.lme<- gamm(Y~ s(z, by=X) +X, random=list(groups=pdDiag(~1+X)) ) but I get the error message : Error in MEestimate(lmeSt, grps) : Singularity in backsolve at level 0, block 1
2011 Jun 24
2
mgcv:gamm: predict to reflect random s() effects?
Dear useRs, I am using the gamm function in the mgcv package to model a smooth relationship between a covariate and my dependent variable, while allowing for quantification of the subjectwise variability in the smooths. What I would like to do is to make subjectwise predictions for plotting purposes which account for the random smooth components of the fit. An example. (sessionInfo() is at
2011 Sep 22
1
negative binomial GAMM with variance structures
Hello, I am having some difficulty converting my gam code to a correct gamm code, and I'm really hoping someone will be able to help me. I was previously using this script for my overdispersed gam data: M30 <-gam(efuscus~s(mic, k=7) +temp +s(date)+s(For3k, k=7) + pressure+ humidity, family=negbin(c(1,10)), data=efuscus) My gam.check gave me the attached result. In order to
2006 Dec 04
1
package mgcv, command gamm
Hi I am an engineer and am running the package mgcv and specifically the command gamm (generalized additive mixed modelling), with random effects. i have a few queries: 1. When I run the command with 1000/2000 observations, it runs ok. However, I would like to see the results as in vis.gam command in the same package, with the 3-d visuals. It appears no such option is available for gamm in the
2012 Feb 22
1
Gamm and post comparison
My data set consist of number of calls (lcin) across Day. I am looking for activity differences between three features (4 sites per feature). I am also looking for peaks of activity across time (Day). I am using a gamm since I believe these are nonlinear trends with nested data. gammdata<-gamm(lcin~Temp+s(Day)+fType+wind+fFeature+Forest+Water+Built, list=fSite,data=data, family=gaussian)
2012 Dec 07
1
Negative Binomial GAMM - theta values and convergence
Hi there, My question is about the 'theta' parameter in specification of a NB GAMM. I have fit a GAM with an optimum structure of: SB.gam4<-gam(count~offset(vol_offset)+ s(Depth_m, by=StnF, bs="cs")+StageF*RegionF, family=negbin(1, link=log), data=Zoop_2011[Zoop_2011$SpeciesF=='SB',]) However, this GAM shows heterogeneity in the
2011 Oct 05
2
gamm: problems with corCAR1()
Dear all, I?m analyzing this dataset containing biodiversity indices, measured over time (Week), and at various contaminant concentrations (Treatment). We have two replicates (Replicate) per treatment. I?m looking for the effects of time (Week) and contaminant concentration (Treatment) on diversity indices (e.g. richness). Initial analysis with GAM models showed temporal autocorrelation of
2013 Jun 07
1
gamm in mgcv random effect significance
Dear R-helpers, I'd like to understand how to test the statistical significance of a random effect in gamm. I am using gamm because I want to test a model with an AR(1) error structure, and it is my understanding neither gam nor gamm4 will do the latter. The data set includes nine short interrupted time series (single case designs in education, sometimes called N-of-1 trials in medicine)