Displaying 20 results from an estimated 2000 matches similar to: "iteration limit error in gamm and notExp2"
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 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
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 17
2
Error message in gamm. Problem with temporal correlation structure
HELLO ALL,
I AM GETTING AN ERROR MESSAGE WHEN TRYING TO RUN A GAMM MODEL LIKE THE ONE BELOW.
I AM USING R VERSION 2.14.1 (2011-12-22) AND MGCV 1.7-12.
M1 <-gamm(DepVar ~ Treatment + s(Year, by =Treatment), random=list(Block=~1), na.action=na.omit, data = mydata, correlation = corARMA(form =~ Year|Treatment, p = 1, q = 0))
THIS IS THE ERROR MESSAGE
Error in `*tmp*`[[k]] : attempt 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 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
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)
2007 Oct 09
2
Help with gamm errors
Dear All
Hopefully someone out there can point out what I am missing! I have a
(large, several hundred) dataset of gardens in which over two years the
presence/absence of a particular bird species is noted each week. I have
good reason to believe there is a difference between the two years in the
weekly proportion of gardens and would like to assess this, before going on
to look in more detail at
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
2010 Aug 04
2
more questions on gam/gamm(mgcv)...
Hi R-users,
I'm using R 2.11.1, mgcv 1.6-2 to fit a generalized additive mixed model.
I'm new to this package...and just got more and more problems...
1. Can I include correlation and/or random effect into gam( ) also? or only
gamm( ) could be used?
2. I want to estimate the smoothing function s(x) under each level of
treatment. i.e. different s(x) in each level of treatment. shall I
2006 Nov 07
1
gamm(): nested tensor product smooths
I'd like to compare tests based on the mixed model representation of additive models, testing among others
y=f(x1)+f(x2) vs y=f(x1)+f(x2)+f(x1,x2)
(testing for additivity)
In mixed model representation, where X represents the unpenalized part of the spline functions and Z the "wiggly" parts, this would be:
y=X%*%beta+ Z_1%*%b_1+ Z_2%*%b_2
vs
y=X%*%beta+ Z_1%*%b_1+ Z_2%*%b_2 + Z_12
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
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
2010 Apr 14
2
GAMM : how to use a smoother for some levels of a variable, and a linear effect for other levels?
Hi,
I was reading the book on "Mixed Effects Models and Extensions in
Ecology with R" by Zuur et al.
In Section 6.2, an example is discussed where a gamm-model is fitted,
with a smoother for time, which differs for each value of ID (4
different bird species). In earlier versions of R, the following code
was used
BM2<-gamm(Birds~Rain+ID+
2006 Jun 06
1
gamm error message
Hello,
Why would I get an error message with the following code for gamm? I
want to fit the a gam with different variances per stratum.
library(mgcv)
library(nlme)
Y<-rnorm(100)
X<-rnorm(100,sd=2)
Z<-rep(c(T,F),each=50)
test<-gamm(Y~s(X),weights=varIdent(form=~1|Z))
summary(test$lme) #ok
summary(test$gam)
Gives an error message:
Error in inherits(x, "data.frame")
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 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
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
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
2010 May 13
1
GAM, GAMM and numerical integration, help please
I am trying to apply methods used by Chaloupka & Limpus (1997) (
http://www.int-res.com/articles/meps/146/m146p001.pdf) to my own turtle
growth data.
I am having trouble with two things...
1) After the GAM is fit, the residuals are skewed.
>m1 <- gam(growth~s(mean.size,
bs="cr")+s(year,bs="cr",k=7)+s(cohort,bs="cr")+s(age,bs="cr"),
data=grow,