search for: gamms

Displaying 20 results from an estimated 115 matches for "gamms".

Did you mean: games
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),...
2009 Jul 08
1
Comparing GAMMs
Greetings! I am looking for advice regarding the best way to compare GAMMs. I know other model outputs return enough information for R's AIC, ANOVA, etc. commands to function, but this is not the case with GAMM unless one specifies the gam or lme portion. I know these parts of the gamm contain items that will facilitate comparisons between gamms. Is it correct to...
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
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
2007 Oct 02
3
mcv package gamm function Error in chol(XVX + S)
Hi all R users ! I'm using gamm function from Simon Wood's mgcv package, to fit a spatial regression Generalized Additive Mixed Model, as covariates I have the geographical longitude and latitude locations of indexed data. I include a random effect for each district (dist) so the code is fit <- gamm(y~s(lon,lat,bs="tp", m=2)+offset(log(exp.)), random=list(dist=~1),
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
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
2009 Jan 22
1
convergence problem gamm / lme
Hope one of you could help with the following question/problem: We would like to explain the spatial distribution of juvenile fish. We have 2135 records, from 75 vessels (code_tripnr) and 7 to 39 observations for each vessel, hence the random effect for code_tripnr. The offset (‘offsetter’) accounts for the haul duration and sub sampling factor. There are no extreme outliers in lat/lon. The model
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)
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
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
2018 Apr 18
0
mgcv::gamm error when combining random smooths and correlation/autoregressive term
I am having difficulty fitting a mgcv::gamm model that includes both a random smooth term (i.e. 'fs' smooth) and autoregressive errors. Standard smooth terms with a factor interaction using the 'by=' option work fine. Both on my actual data and a toy example (below) I am getting the same error so am inclined to wonder if this is either a bug or a model that gamm is simply unable
2011 Mar 10
2
ERROR: gamm function (mgcv package). attempt to set an attribute on NULL
Hello:I run a gamm with following call :mode<-gamm(A~B,random=list(ID=~1),family=gaussian,na.action=na.omit,data=rs)an error happened:ERROR names(object$sp) <- names(G$sp) : attempt to set an attribute on NULLwith mgcv version 1.7-3What so? How can I correct the Error? Thanks very much for any help. [[alternative HTML version deleted]]
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)
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 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-inj...
2013 Mar 15
0
Poisson and negbin gamm in mgcv - overdispersion and theta
...negbin(THETA, link="log")) 3) And finally, can I somehow compare the models M1 and M2? Trying anova(M1,M2) gives the message: "Error in eval(expr, envir, enclos) : object 'fixed' not found" (and I am anyway not sure if this is a valid approach between Poisson and negbin gamms). I am most grateful for any help! Aino Aino Hosia Postdoc Havforskningsinstituttet/Institute of Marine Research PO Box 1870 Nordnes, N-5817 Bergen, Norway (Nordnesgaten 50) Tel: +47 55 23 53 49 E-mail: aino.hosia@imr.no<mailto:aino.hosia@imr.no> www.imr.no<http://www.imr.no/>...
2010 Jan 26
1
AIC for comparing GLM(M) with (GAM(M)
...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 GLMs/GLMMs, by fitting splines. GLMMs/GAMMs are used to possibly improve fits from GLMs/GAMs by accounting for serial dependence. My idea is to use AIC to compare the different models. I’ve noticed that when setting up two seemingly identical models using the two functions gam (...