Displaying 20 results from an estimated 400 matches similar to: "gamm error message"
2006 Jul 03
1
gamm
Hello,
I am a bit confused about gamm in mgcv. Consulting Wood (2006) or Ruppert et al. (2003) hasn't taken away my confusion.
In this code from the gamm help file:
b2<-gamm(y~s(x0)+s(x1)+s(x2)+s(x3),family=poisson,random=list(fac=~1))
Am I correct in assuming that we have a random intercept here....but that the amount of smoothing is also changing per level of the
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)
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
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
2006 Oct 25
1
Help with random effects and smoothing splines in GAMM
Try to fit a longitudinal dataset using generalized mixed effects models
via the R function gamm() as follows:
library(mgcv)
gamm0.fit<- gamm(y ~ x+s(z,bs="cr"),
random=list(
x=~1,
s(z,bs="cr")=~1
),
family = binomial, data =raw)
the data is
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 =
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 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]]
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:
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)
2009 Mar 01
1
gamm (mgvc) and time-varying coefficient model
Dear R users,
I have repeated measurements on individuals. I want to estimate the
time-varying effect of a factor variable X (taking three levels), e.g. a
model in the spirit of Hastie and Tibshirani (1993).
I am considering using the package "mgvc" which implements generalized
additive models, especially the function gamm, which estimates
generalized additive mixed models, and thus,
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 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
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:
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
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
2008 May 21
2
an unknown error message when using gamm function
Dear everyone,
I'm encountering an unknown error message when using gamm function:
> fitoutput <-
gamm(cvd~as.factor(dow)+pm10+s(time,bs="cr",k=15,fx=TRUE)+s(tmean,bs="cr",k=7,fx=TRUE)
+
,correlation=corAR1(form=~1|city),family=poisson,random=list(city=~pm10),data=mimp)
Maximum number of PQL iterations: 20
iteration 1
iteration 2
iteration 3
iteration 4