Questions tagged [gam]

Generalized additive model (GAM) is a generalized linear model (GLM) in which the response variable depends on unknown smooth functions of some predictor variables.

Filter by
Sorted by
Tagged with
0
votes
1answer
43 views

Why the dependent variable as a time series in GAM should be log transformed?

I found in Section 3.1 of this paper (see ), the author used log(y) due to "the context of a concentration time series". A book (Hastie and Tibshirani, 1990) is cited, however I cannot get this book. ...
2
votes
3answers
1k views

Problems interpreting GAM output

I have been advised to run General Additive Models to be able to describe trends in my data, my data being animal harvest numbers by year. I have done so, but have a problem with interpreting the ...
8
votes
2answers
756 views

Different ways of modelling interactions between continuous and categorical predictors in GAM

The following question builds on the discussion found on this page. Given a response variable y, a continuous explanatory variable ...
0
votes
0answers
54 views

Practically speaking, what do the three concurvity measures provided by the package mgcv mean?

I am using the R package mgcv to examine the association between asthma visits to the ER and air pollution. Most of my terms are parametric, with the exception of time, which is a smooth cubic ...
3
votes
0answers
55 views

How can I incorporate a known measurement error per group into a GAM?

I am trying to investigate surface changes using a time series of 3D point clouds. Due to data volume, I am segmenting the point cloud in small (eg. 50cmx50cm) areas and for each compute a generalized ...
2
votes
1answer
274 views

Random effects in GAM

I'm modelling some biological function, outcome, in patients over 8 hours. Over time, I measure two additional covariates x and ...
1
vote
0answers
31 views

How to measure the amount of confounding in tensor interaction in GAMs?

I am interested in fitting an additive model with tensor interaction terms. This construction is described in Wood (2006) and used in the mgcv ...
0
votes
1answer
43 views

How to plot mortality at age curve using lifespan data

I have a table with the lifespan of multiple individuals from a species and would like to use this data to plot a mortality rate curve, similar to that shown in figure 1 of this study:https://www....
3
votes
0answers
28 views

How do I use GAMs in instrumental variable analysis?

I have an outcome $Y$, a risk factor $X$, and an instrument $Z$. In a two-stage least squares (2SLS) setting, the first stage is $$ X=Z + \varepsilon $$ and the second stage uses predictions from ...
3
votes
1answer
208 views

Hard in calculating predictor‘s Relative Importance for GAM?

Although there is no agreement upon "relative importance for predictors" with (even) linear models (one possible definition: lmg method), I would still want to know whether there are some acceptable ...
0
votes
2answers
201 views

What is the acceptable level of concurvity?

I got the following concurvity values as a result of a GAM model. ¿are they high or low? I don't know what is the acceptable value... Thanks, Karla .
0
votes
0answers
77 views

Step failure in theta estimation using bam() in mgcv

I am using ?bam in mgcv 1.8-24, and when I'm using the negative binomial family I sometimes get a warning that says: ...
2
votes
0answers
299 views

Which index is preferred in GAM, “R-sq” or “Deviance explained”?

I use mgcv package in R to build a Generalized Additive Model. When looking at results of (e.g., summary()), there are two ...
1
vote
1answer
39 views

Why 2nd derivative is “squared” to represent wigglyness in GAM?

In David Miller's presentation (here, slide 21), he drew 1st derivative and 2nd derivative of a function. Then he said (slide 22) that grey part can is : $ \int (\frac{\partial ^{2}f(x)}{\partial x^{...
1
vote
1answer
47 views

Differences of GAMs and GLM

I'm currently looking at a dataset and have to create a model to predict outcomes for whose values are non-negative. I'm looking at using a GLM or GAM for my data though I'm unaware of what would work ...
5
votes
1answer
480 views

Does GAM (Generalized Additive Model) have collinearity problem?

There is collinearity effect in linear regression methods. For example, this question is about collinear predictors in GLM. But GAMs are nonlinear, do we need to check the collinearity of independent ...
1
vote
0answers
300 views

How partial residuals in “plot.gam” are calculated?

Take mtcars as an example. I build a GAM model between mpg (dependent variable) and disp and ...
1
vote
1answer
56 views

Why trend between smooth plots (of GAM) and scatter plot is the opposite?

Below is an example using mtcars. ...
0
votes
1answer
116 views

mgcv::gam(). ANOVA decomposition of a factor-by-variable interaction

Suppose: y is a continuous response variable. z is a factor variable, and x is a continuous variable. For example, ...
1
vote
1answer
252 views

Confidence Interval for non-smooth term in gam (mgcv)

I fitted a gam model in mgcv package and now want to get the confidence intervals for the non-smooth term. ...
1
vote
0answers
74 views

Standarized coefficients of a general additive model GAM

I am using a GAM model to study the effects of time (in weeks) and quality parameters (qp1, qp2, qp3 and qp4) on a response variable. Since the effect of time is modelled best by a spline, I am using ...
0
votes
0answers
12 views

Does the parametric coefficient from GAMM compare patterns between groups over time, or just the means?

I have data consisting of the distance cats travelled each hour, collected over four or five days per cat. The cats were measured in different seasons and I want to know whether the activity of the ...
1
vote
0answers
60 views

bam() error: “reparameterization unstable for margin: not done”

In running a large GAM model of the form mgcv::bam(y ~ te(x, y, k = 100, bs = 'ts'), family = binomial, discrete = TRUE) I get this warning <...
4
votes
2answers
807 views

Interpreting GAM Coefficients

I could use some advice interpreting GAM (Generalized Additive Model) coefficients. I get the following results when I call coef on my model: ...
1
vote
1answer
113 views

R: generalised additive model on proportional data

Introduction I am analysing temporal population data on the amphipod Orchestia gammarellus. At several moments each year, all animals were collected from a small spot, and several life history traits ...
5
votes
0answers
51 views

Compare if two regression model behaves similarly [closed]

this is my first asking question here... forgive me if my question is not clear enough. I have two datasets; one is ground truth dataset and another is perturbed version of the same dataset. I want ...
2
votes
1answer
393 views

Difference between s() and ti() terms in mgcv package when applied to one variable

I am using the mgcv package in R to fit logistic GAMs to survey data. In one of my models I use an interaction between two covariates. I am currently trying to fit ...
1
vote
0answers
44 views

gam/gamm when response variable is complex

I would like to fit a generalized additive mixed model using mgcv or gamm4, but have a response variable consisting of complex numbers where y=a+1i*b. Is this possible, and if so are there any special ...
2
votes
1answer
63 views

How to make a random draw from a mgcv GAM model

Hi there statistical wizards! I have a (maybe) minor problem, where I would like to use the predicted fit (fit) and standard error (...
2
votes
1answer
154 views

Quadratic polynomial - how to test correlation between x and y?

I have one dependent variable (fish abundance) and one independet variable (time), both continuous. I would like to test the correlation between them because I expect that the abudance changes over ...
2
votes
0answers
99 views

Formulating mutli-membership random effects in lme4/GAMM4

I'm trying to fit a GAM with multi-membership random effects and nested effects in the package GAMM4, which uses lme4 syntax. Does anyone have any experience doing this in either package? Is it ...
1
vote
0answers
16 views

Model building, how to include information on data point quality?

I have a dataset with count data predictors and a marker on their reliability or completeness. With 2 options: 0 - Data is not confirmed (could be higher); 1 - data is confirmed to be complete. The ...
0
votes
0answers
42 views

Dealing with complete separation in Generalized Additive Models

Related to "How to deal with perfect separation in logistic regression?": I am modelling survival using a binomial mixed model (gamm from ...
1
vote
1answer
84 views

Why doesn't penalized cubic regression reduce the number of knots in a GAM?

As far as I understand, cubic regression penalization prevents overfitting by reducing the number of knots by penalizing wiggliness. The supplied parameter k serves ...
0
votes
1answer
86 views

Circular smooths within a GAM-GEE framework

I have a predictor variable which I fit in a GAM as a circular smooth term: ...
2
votes
0answers
227 views

GAMM with multiple and crossed random effects

I am new to Generalized additive mixed models (GAMM) and I'm trying to model a behavioral response variable (time spent shading eggs by a nesting bird in minutes ...
2
votes
1answer
533 views

How to fit a longitudinal GAM mixed model (GAMM)

I have repeated measurements of individuals, like this ...
3
votes
1answer
73 views

Why p-values are not significant even though AIC values improved a lot in model selection using GAM mix modelling and beta regression

Dear StatExchange community, I am studying disease progression in plant leaves and I am trying to estimate differences between a wild-type and a mutant plant. To achieve this I am using the ...
1
vote
1answer
36 views

Whats is the difference between using risk() and cvrisk() in the R package mboost

I am currently running an additive model using the function gamboost() in the package mboost. When using the ...
1
vote
0answers
65 views

Data exploration to determine if GAMs are appropriate [duplicate]

How to decide, based on data exploration and data visualisation, between a GAM and a GLM. Linear Models (LM) assume that the relationship between the response and the predictor are linear. ...
1
vote
1answer
202 views

Random effect in GAM - what are the smooth functions used?

In the GAM package in R created by Simon Wood there is a selection of the smooth function basis. I sort of understand the options such as bs='tp', bs='cr', etc. But bs='re' seems odd... that does ...
4
votes
1answer
178 views

How much of a problem are autocorrelated residuals of a binary GAM (Generalized Additive model)?

I'm trying to predict high or low crime rate in municipalities (binary 1/0 response variable) using a range of socioeconomic variables. Im doing this with a panel dataset with 300 municipality over 17 ...
1
vote
1answer
46 views

Differences between “in-bag” and “out-of-bag” empirical risks in the R package “mboost”

currently I am using the mboost R-package to estimate some additive models. When using the function gamboost(), you can control the hyper-parameters for boosting by using the option boost_control(). ...
0
votes
0answers
408 views

GAM residuals , GAM check

I am doing my GAM regression analysis in R and by using the gam.check() function from the ...
5
votes
0answers
205 views

Time series models (e.g. ARMA) a type or extension of GLM? Particular/stipulated forms of dependence in time series models

I am trying to understand the relationship between ARMA Time Series models and the GLM (Generalized Linear Model) family of models. As far I know, all GLMs have the following 3 components: 1) random ...
2
votes
1answer
122 views

Modeling academic seasonality with hierarchical GAMs

I am trying to model the seasonality of daily pageviews to calculus-related Wikipedia articles using a hierarchical GAM, assuming that there is a shared 'academic calendar' seasonality and that each ...
1
vote
1answer
58 views

predict.bam() produces different results when data is subset

Apologies in advance since I cannot provide a reproducible example due to the immense size of my model. I'll do my best to describe my situation fully, hopefully this will be sufficient. My model ...
0
votes
1answer
74 views

using normal Generalized additive model rather than zero inflated regression

I am doing regression analysis for my data , nearly half of my data is Zero . I have conducted Generalized additive model for my data ; but I was wondering if it is enough to do only generalized ...
5
votes
2answers
111 views

What is Dimension of basis in splines

From mgcv package, gam(for generalized additive model fit) function uses the parameter 'k' which is dimension of basis. Can anyone explain to me what does dimension of basis function means in spline ...
2
votes
1answer
128 views

GAM using a cyclic spline improves residual structure but reduces fit

I'm working on a dataset monitoring soil moisture levels throughout the summer. The general trend in the data is the following: When I use a GAM with default thin-plate spline and AR(1)process there ...

1 2 3 4 5 11