similar to: gamm and binomial data

Displaying 20 results from an estimated 7000 matches similar to: "gamm and binomial data"

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
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 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)+
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
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
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 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
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 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
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+
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
2011 Sep 26
1
normalizing a negative binomial distribution and/or incorporating variance structures in a GAMM
 Hello everyone, Apologies in advance, as this is partially a stats question and partially an R question.  I have been using a GAM to model the activity level of bats going into and coming out from a forested edge.  I had eight microphones set up in a line transect at each of eight sites, and I am hoping to construct a model for each of 7 species.  My count data has a reverse J-shaped skew and
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
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,
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)
2004 Mar 06
2
GlmmPQL with binomial errors
Hi all! I hope somebody can help me solve some doubts which must be very basic, but I haven't been able to solve by myself. The first one, is how to assess for overdispersion in GlmmPQL when fitting binomial or poisson errors. The second one is whether GlmmPQL can compare models with different fixed effects. The third doubt, regards the way I should arrange my data in a GlmmPQL with
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 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
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]]
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),