similar to: question about gamm models

Displaying 20 results from an estimated 10000 matches similar to: "question about gamm models"

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
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")
2017 Dec 29
0
Why aov() with Error() gives three strata?
At any rate: Error(SUBJECT/IV) specifies two random effects: SUBJECT and SUBJECT:IV. This is most easily understood if you conceptually arrange your data in a SUBJECT x IV table: One effect is a set of random errors added to each row, the other is a set of effects added to each cell. If you have more than one observation within each cell, then you need a third set of errors to account for
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
2012 May 30
0
anova.coxph for multiple events model
Hi, I'm trying to do a multiple events model using coxph. I need to choose which covariates stay in the final model and i'm using anova but it seems that it doesn't work with robust variances as a error message appears when I try to do it: /PWPfit<-coxph(Surv(ini,fim,status)~Sexo+Transmissao+Regime+HAART+Drogas+Psi+ + CD4+CV+Neo+IO+cluster(idPARTICIPANTE)+strata(Estrato),data=PWP)
2017 Dec 28
2
Why aov() with Error() gives three strata?
Bert, thanks for the reply but I feel that my question is less about statistics and more about R interface. Specifically, because the output of R seems different than other programs (systat, for example, gives a between and a within table instead of a three level one). I am familiar with the connection between mixed models and repeated measures,and how mixed models are essentially replacing the
2019 Oct 04
0
Error in [.terms
Martin, ? There are a couple of issues with [.terms that have bitten my survival code.? At the useR conference I promised you a detailed (readable) explanation, and have been lax in getting it to you. The error was first pointed out in a bugzilla note from 2016, by the way.? The current survival code works around these. Consider the following formula: <<testform>>=
2008 Aug 28
0
USING TOBIT OR WHAT ALTERNATIVE WHEN DATA ARE PANEL AND HETEROSKEDASTIC AND PROBABLY AUTOCORRELATED?
Please, I seek expertise and advice, possibly leads to R packages or stats literature. My data: measurements of economic variables for each county of California over 37 years. My dependent variable is square feet of office floor space permitted to be added in a county. Independent variables include for example change in number of office jobs in same county same year (and lagged years).
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 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
2017 Dec 28
0
Why aov() with Error() gives three strata?
Jorge: FYI, *generally speaking,* queries that are mostly statistical in nature, such as yours, are off topic here -- this list is about R programming help, not statistical help. Having said that, you still may get a useful response here -- the r-help/statistics intersection *is* nonempty. However, if not, 2.5 suggestions: 1. Try posting to r-sig-mixed-models instead. Repeated measures are a
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)