similar to: gamm: tensor product and interaction

Displaying 20 results from an estimated 1000 matches similar to: "gamm: tensor product and interaction"

2012 Apr 25
1
random effects in library mgcv
Hi, I am working with gam models in the mgcv library. My response variable (Y) is binary (0/1), and my dataset contains repeated measures over 110 individuals (same number of 0/1 within a given individual: e.g. 345-zero and 345-one for individual A, 226-zero and 226-one for individual B, etc.). The variable Factor is separating the individuals in three groups according to mass (group 0,1,2),
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
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
2003 May 26
3
chan_h323 and extensions.conf
Hi all, I try to ask helps again about chan_h323 extensions. I define this in h323.conf: [general] port = 1720 bindaddr = 0.0.0.0 allow=gsm allow=ulaw gatekeeper = DISABLE context=default [gm1] type=friend host=192.168.1.20 context=default [gm2] type=friend host=192.168.1.25 context=default and I have in extensions.conf : [demo]
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 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 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 = ~
2009 May 20
1
Plot data from table with column and row names
Dear All Sorry for what appears a trivial matter - I'm new to R and am stumbling ahead. I have a table of numerical data (36 rows by 12 columns) such as below: GM1 GM2 GM3 GM4 GM5 ...etc GM12 Run1 1 2 1 2 3 ... Run2 2 1 3 2 1 ... ... Run36 2 1 1 1 1 I would like to plot simple line graphs of some of the runs or
2012 Sep 18
1
Lowest AIC after stepAIC can be lowered by manual reduction of variables
Hello I am not really a statistic person, so it's possible i did something completely wrong... if this is the case: sorry... I try to get the best GLM model (with the lowest AIC) for my dataset. Therefore I run a stepAIC (in the "MASS" package) for my GLM allowing only two-variable-interactions. For the output (summary) I got a model with 7 (of 8) variabels and 5 interactions and
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
2010 Jan 26
1
AIC for comparing GLM(M) with (GAM(M)
Hello I'm analyzing a dichotomous dependent variable (dv) with more than 100 measurements (within-subjects variable: hours24) per subject and more than 100 subjects. The high number of measurements allows me to model more complex temporal trends. I would like to compare different models using GLM, GLMM, GAM and GAMM, basically do demonstrate the added value of GAMs/GAMMs relative to
2010 Apr 13
2
transpose but different
Hi all, I want to make extra columns in my datafile where the id of every groupmember is mentioned in separate columns. To explain it better see the example: id<-c(1,2,3,4,5,6,7,8,9,10,11,12) group<-c(1,1,1,1,2,2,3,3,3,3,3,3) a<-as.data.frame(cbind(id,group)) a id group 1 1 1 2 2 1 3 3 1 4 4 1 5 5
2013 Jul 08
1
error in "predict.gam" used with "bam"
Hello everyone. I am doing a logistic gam (package mgcv) on a pretty large dataframe (130.000 cases with 100 variables). Because of that, the gam is fitted on a random subset of 10000. Now when I want to predict the values for the rest of the data, I get the following error: > gam.basis_alleakti.1.pr=predict(gam.basis_alleakti.1, +
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:
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,
2012 Mar 29
0
multiple plots in vis.gam()
Hi, I'm working with gamm models of this sort: gm<- gamm(Z~te(x,y),data=DATA,random=list(Group=~1)) gm1<-gamm(Z~te(x,y,by=Factor)+Factor,data=DATA,random=list(Group=~1)) with a dataset of about 70000 rows and 110 levels for Group if I use plot(gm1$gam), I obtain 3 different surface plots, one for each level of my factor but I would like to create more complex contour plots for those 3
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)
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
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)
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