Displaying 20 results from an estimated 21 matches for "gamm4".
Did you mean:
gamma
2011 Jul 19
2
Incorrect degrees of freedom for splines using GAMM4?
Hello,
I'm running mixed models in GAMM4 with 2 (non-nested) random intercepts and
I want to include a spline term for one of my exposure variables. However,
when I include a spline term, I always get reported degrees of freedom of
less than 1, even when I know that my spline is using more than 1 degree of
freedom. For example, here is...
2012 Nov 27
2
Help with graphics in gamm4 library
My problem is relatively straight forward, but I cannot seem to find a way to
make it work.
I have a RCBD with repeated measurements over time. I have created a fit
using the gamm4 package. My model is:
fit4a <- gamm4(Rate ~ s(Time,by=trt,bs="cr")+trt,data=qual.11.dat,
random=~(1|block),correlation=corARH1())
What I would like to create is plots with the X-axis being time, the Y-axis
being the fitted Rates for each individual treatment with the...
2010 Jan 26
1
AIC for comparing GLM(M) with (GAM(M)
..., 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 (of the package mgcv) and gamm4 (of the package with
same name), the AIC turns out to be different:
> gam.0<-gam(dv ~
s(hours24,fx=F,k=-1,bs=“cc“),method="ML",data=sdata, family=binomial)
> gamm.0<-gamm4(dv ~
s(hours24,fx=F,k=-1,bs=“cc“),method="ML",data=sdata, family=binomial)
Fit indic...
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 us...
2018 Jan 23
0
interaction term by a factor group in gamm4
Dear all,
I am writing as I would really need your help on the problem with gamm4. I have tried to find a solution online but I wasn't very successful.
I am running a gamm4 model with an interaction between two variable using the tensor term, t2. I have a group variable (super end group) with six factors; I would like to run the model to see the how the interaction term var...
2012 May 03
1
conducting GAM-GEE within gamm4?
...1
Here is the summary of my block variable (indicating the number of
groups for which autocorrelation exists within each block
> summary(dat2$block)
Min. 1st Qu. Median Mean 3rd Qu. Max.
1.00 39.00 76.00 73.52 111.00 148.00
However, I would like to use the package 'gamm4', as I am more familiar
with Professor Simon Wood's packages and functions, and it appears gamm4
might be the most appropriate. It is important to note that the models have
a binary response (organism presence of absence along a transect), and thus
why I think gamm4 is more appropriate than...
2017 Jun 12
2
plotting gamm results in lattice
Dear all,?
I hope that you can help me on this. I have been struggling to figure this out but I haven't found any solution.
I am running a generalised mixed effect model, gamm4, for an ecology project. Below is the code for the model:
model<-gamm4(LIFE.OE_spring~s(Q95, by=super.end.group)+Year+Hms_Rsctned+Hms_Poaching+X.broadleaved_woodland? ? ? ? ? ? ?+X.urban.suburban+X.CapWks, data=spring, random=~(1|WATERBODY_ID/SITE_ID))
plot(model$gam, page=1, font.lab=2, xlab=&q...
2017 Jun 12
0
plotting gamm results in lattice
Hi Maria
If you have problems just start with a small model with predictions and then plot with xyplot
the same applies to xyplot
Try
library(gamm4)
spring <- dget(file = "G:/1/example.txt")
str(spring)
'data.frame': 11744 obs. of 11 variables:
$ WATERBODY_ID : Factor w/ 1994 levels "GB102021072830",..: 1 1 2 2 2 3 3 3 4 4 ...
$ SITE_ID : int 157166 157166 1636 1636 1636 1635 1635 1...
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), random = ~ (1|vpnr),data=sdata,...
2010 Aug 05
2
compare gam fits
Hi folks,
I originally tried R-SIG-Mixed-Models for this one
(https://stat.ethz.ch/pipermail/r-sig-mixed-models/2010q3/004170.html),
but I think that the final steps to a solution aren't mixed-model
specific, so I thought I'd ask my final questions here.
I used gamm4 to fit a generalized additive mixed model to data from a
AxBxC design, where A is a random effect (human participants in an
experiment), B is a 2-level factor predictor variable, and C is a
continuous variable that is likely non-linear. I tell gamm4 to fit a
smooth across C to each level of B indep...
2012 Apr 02
1
gamm: tensor product and interaction
...be enough to conclude? I saw a preceding post on similar issues
http://r.789695.n4.nabble.com/Comparing-and-Interpreting-GAMMs-td2234209.html
but that example used simple s() smooths instead of tensor product smooths. In this case, the person was comparing between model A and model A1 like:
A<-gamm4(Z~factor+s(x)+s(x,by=factor) ,data=DATA, random=~(1|Group))
A1<- gamm4(Z~factor+s(x) ,data=DATA, random=~(1|Group))
I thus also tried to compare my model gm1, with another gm2 model of that sort:
gm2<-gamm(Z~te(x,y)+te(x,y,by=Factor)+Factor,data=DATA,random=list(Group=~1))
but this type of m...
2013 Dec 05
0
mgcv gam modeling trend variation over cases
...e, (b) is it
linear or nonlinear in each case, and (c) does trend vary significantly
over cases (PID), the latter presumably to be measured with a random
effect. I can do the first two (not shown here), but am not sure about
the third. I am using generalized additive models, either mgcv gam or
gamm4. For example, using mgcv gam my syntax is
M1 <- gam(DVY ~ s(SessIDX, bs = "re") + factor(TX),
data = PCP,
family = quasipoisson(link="log"), method="REML")
summary(M1,all.p=TRUE)
gam.vcomp(M1)
Using gamm4, my syntax is
PCP$fPID <- fact...
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) from
one study. They report a proportion as outcome (y), computed from a
behavior either observed or not out of 10 trials per time point. H...
2012 Apr 25
1
random effects in library mgcv
...,x2)+ te(x1,x2,by=Factor1)+ te(x1,x2,by=Factor2)+s(Individual,bs="re"),dat=Data,family=binomial(link=logit),method="REML")
1)First question: is it OK to use gam() to model a binary variable with random effects coded as a "bs="re" term"??
I have read that the gamm4() function gives better performance than gamm() to deal with binary variables when random effects are coded as: random=~(1|Individual) but does that mean that binary variables should not be used as response variable in gam() with random effects coded as bs="re"???
2)Second question: For...
2013 Jan 15
0
temporal and spatial correlation structures in GAMM
...(e.g. SHRUB_CV) with the response variable it leads me to the gamm option…
I start the
model building procedure by finding firstly the best fixed structure and after
the best random effect structure and finally the best model.
I my case
my first attempt final model was obtained by:
Model <-
gamm4(TREE_01 ~ s(Day) + T_MAX + SHRUB_CV + D_AV5RS_KM +
D_RIP_KM +
FOREST_PP, random = ~ (1 | fAnimal),
method =
"REML", control = lmc, family = binomial, data = RSTEMP_01_X2)
summary(Model$gam)
Family:
binomial
Link
function: logit
Formula:
TREE_01 ~
s(Day) + T_MAX + SHRUB_CV + D_AV5RS_K...
2010 Sep 29
1
generalized additive mixed models for ordinal data
? stato filtrato un testo allegato il cui set di caratteri non era
indicato...
Nome: non disponibile
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20100929/bedab79b/attachment.pl>
2011 Jun 16
0
lmer: How to plot a spline from function
...e looks like this:
mod <- lmer(aim ~ bs(time) + var1 + var2 + factor(var3) +... +factor(var12)
+ (1|ID) ,family=binomial(link = "logit"), data=data)
It works, but what I also want to do is plotting the time-spline, and I just
can't find out how to do this.
I also tried a gamm4 and a amer function, but I think they can't handle all
the NA-values in the dataset as I always get error messages when I put all
the variables into the model ("Matrices must have same number of columns in
rbind2(..1, r)").
I'd be really thankful if someone could help me on this...
2010 Jun 25
1
Different standard errors from R and other software
Hi all,
Sorry to bother you. I'm estimating a discrete choice model in R using
the maxBFGS command. Since I wrote the log-likelihood myself, in order to
double check, I run the same model in Limdep. It turns out that the
coefficient estimates are quite close; however, the standard errors are very
different. I also computed the hessian and outer product of the gradients in
R using the
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 Aug 24
6
CRAN (and crantastic) updates this week
CRAN (and crantastic) updates this week
New packages
------------
Updated packages
----------------
New reviews
-----------
This email provided as a service for the R community by
http://crantastic.org.
Like it? Hate it? Please let us know: cranatic at gmail.com.