similar to: gamm with correlation structure question

Displaying 20 results from an estimated 1000 matches similar to: "gamm with correlation structure question"

2011 Dec 15
0
corCompSymm in gamm()?
Hi, I have confirmed temporal correlation problems in my data. Is there a possibility to use corCompSymm for a gamm()? I am an R-beginner. I have very short time series. There are three years and within each year, there are 10 weeks. he 10 weeks are the same every year and have not unique values, I seem not to be able to use AR-1 (I assume that I have too little data for autoregression
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
2013 Mar 15
0
Poisson and negbin gamm in mgcv - overdispersion and theta
Dear R users, I am trying to use "gamm" from package "mgcv" to model results from a mesocosm experiment. My model is of type M1 <- gamm(Resp ~ s(Day, k=8) + s(Day, by=C, k=8) + Flow + offset(LogVol), data=MyResp, correlation = corAR1(form= ~ Day|Mesocosm), family=poisson(link=log)) where the response variable is counts, offset by the
2012 Jun 11
0
gamm (mgcv) interaction with linear term
Hello, I am trying to fit a gamm (package mgcv) model with a smooth term, a linear term, and an interaction between the two. The reason I am using gamm rather than gam is that there are repeated measures in time (which is the smooth term x1), so I am including an AR1 autocorrelation term. The model I have so far ended up with is of the type gamm(y ~ s(x1) + s(x1, by=x2), correlation =
2005 Apr 13
0
GAMM in mgcv - significance of smooth terms
In the summary of the gam object produced by gamm, the "Approximate significance of smooth terms" appears to be a test of the improvement in fit over a linear model, rather than a test of the significance of the overall effect of x on y: test.gamm<-gamm(y~te(x, bs="cr"), random=list(grp=~1)) summary(test.gamm$gam) . . . Approximate significance of smooth terms:
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
2008 Oct 13
0
gamm() and predict()
Dear All, I have a query relating to the use of the ?predict? and ?gamm? functions. I am dealing with large (approx. 5000) sets of presence/absence data, which I am trying to model as a function of different of environmental covariates. Ideally my models should include individual and colony as random factors. I have been trying to fit binomial models using the gamm function to achieve this. For
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 Jul 03
0
gamm and binomial data
Hello, I have a response variable that is a time series of 0's and 1's. And a couple of continous explanatory variables. I would like to fit a gamm with auto-correlation and binomial distribution using gamm in mgcv. Something simple like: tmp<-gamm(y ~ s(x), correlation=corAR1(), binomial) However, I read in various messages on this newsgroup that glmmPQL (used
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
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
2011 Mar 23
1
how to add in interaction terms in gamm
I want to use gamm to generate smoothed trend line for three groups identified by dummy variable genea and geneb. My question is how to add in an interaction term between the time and another dummy variable such as gender? fitm<-gamm(change_gfr~ genea+geneb+s(timea_n,bs="ps")+s(timeb_n,bs="ps")+s(timec_n,bs="ps"),data=mm,random=list(time_n=~1|PID)) -- View this
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
2008 Oct 16
0
R package: autocorrelation in gamm
Dear users I am fitting a Generalized Additive Mixed Models (gamm) model to establish possible relationship between explanatory variables (water temperature, dissolved oxygen and chlorophyll) and zooplankton data collected in the inner and outer estuarine waters. I am using monthly time-series which are auto-correlated. In the case of the inner waters, I have applied satisfactoryly (by
2006 Aug 08
0
gamm question
Hello, I have two gamm question (I am using gamm in mgcv). 1. In have, say 5 time series. Monthly data, 20 year. The 5 time series are from 5 stations. The data are in vectors, so I have fitted something along the lines of: tmp<-gamm(Y ~ s(Year,by=station1)+s(Year,by=station2)+ s(Year,by=station3)+s(Year,by=station4)+
2010 Jul 21
0
Validation in R for GAMM
My GAMM model is to find drivers of species richness in forests is gamm1<- gamm(Total Species Richness ~ fROT + s(PH) + s(LOI) + ASP + s(SQRT_ELEV) + CANCOV + s(SQRT_TOTCWD) + s(WELLF) + s(WELLN) + s(OLDWDLD) + s(DISTWOOD) + s(Annprec), random=list (fSITE =~1), family = poisson, data = BIOFOR3) My issues are that the validation graphs are using methods I'm unfamiliar with e.g. square
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)
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),
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
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