Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

1
vote
2answers
31 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 ...
5
votes
0answers
92 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
21 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 ...
0
votes
0answers
15 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 compute a GAM for each that ...
1
vote
1answer
19 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
21 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
28 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....
2
votes
0answers
20 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
37 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
1answer
16 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
21 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
23 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
26 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
31 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 ...
2
votes
1answer
65 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
29 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
29 views

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

Below is an example using mtcars. ...
0
votes
1answer
26 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
52 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
24 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
7 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 ...
0
votes
0answers
14 views

Model Deviance lower than Residual Degree of Freedom

I am trying to calculate the Variance inflation factor (VIF) for a Generalized Additive Model (GAM). The GAM model contains both constant terms and splines. The VIF is defined as Deviance of model ...
1
vote
0answers
27 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 <...
3
votes
2answers
89 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
76 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
37 views

Compare if two regression model behaves similarly

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
0answers
101 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 ...
0
votes
0answers
23 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 ...
1
vote
1answer
20 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
33 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
81 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
14 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
17 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
59 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
0answers
29 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
35 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 ...
1
vote
1answer
80 views

How to fit a longitudinal GAM mixed model (GAMM)

I have repeated measurements of individuals, like this ...
3
votes
1answer
49 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
22 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
38 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
59 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
125 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
27 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
83 views

GAM residuals , GAM check

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

Additive Gaussian Processes with Penalized Likelihood

I have a problem with many - say $D$ - input variables, $\mathbf x=(x_1,\dotsc,x_D)^\top$. I have have dataset $\mathcal D$ of $n$ input/outputs, with $n<D$. Only $\delta<<D$ should suffice ...
2
votes
0answers
113 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
59 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
33 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
42 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 ...
4
votes
2answers
52 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 ...