Displaying 20 results from an estimated 1000 matches similar to: "gamm: problems with corCAR1()"
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
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
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 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
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
2010 Jul 28
1
strange error : isS4(x) in gamm function (mgcv package). Variable in data-frame not recognized???
Dear all,
I run a gamm with following call :
result <- try(gamm(values~ s( VM )+s( RH )+s( TT )+s( PP
)+RF+weekend+s(day)+s(julday) ,correlation=corCAR1(form=~ day|month
),data=tmp) )"
with mgcv version 1.6.2
No stress about the data, the error is not data-related. I get :
Error in isS4(x) : object 'VM' not found
What so? I did define the dataframe to be used, and the
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
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
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
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
2005 May 25
1
question: corCAR1 in lme
Hello all,
I am trying to use lme to examine how a response variable (Chla) changes
over time in different treatments (2 Temp & 2 Light levels). Within each
treatment combination, there are two replicate tanks (each with unique
TankID) with coral fragments in them. All tanks are subject to the same
environment until Time=0, when treatments are imposed, and Chla is measured
for each
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
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),
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
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
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)
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]]
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