generalized additive model
0
votes
0answers
31 views
Why are additive models useful
I have been studying about additive models.
I want to know their advantages. What do they provide that others don't
Any suggestions will be much appreciated
0
votes
0answers
21 views
Combinatorics problem applied to GAM Logistic regression. R code
I'm doing biomedical research and I need to set a GAM Logistic Model which get the maximum AUC score as possible. I have 4 disease markers; $Y_1, Y_2, Y_3, Y_4$ with different data in each one, and ...
1
vote
0answers
27 views
Causal identification and penalized splines
I just got a rejection from an economics journal. Among the reasons cited for rejection were:
the benefits of using the semi-parametric method are not clearly
brought out compared to ...
0
votes
1answer
43 views
Predicting with GAM, using an offset
I came in a new post because I’m quite confused with the use of an offset in gam() function (mgcv package). I’m actually working on predicting marine top predator’s distribution using aerial surveys ...
0
votes
0answers
20 views
three-way spatial interaction using mgcv
I am fitting a model with gam from the mgcv library which contains smooth terms. I would like to know how to specify a three-way interaction of a two-dimensional smooth of space and a two level ...
2
votes
1answer
122 views
Principled ways of constraining $E[Y]=0$ when one of your regressors $\rightarrow$ 0
Consider the following ridiculous example. There is a real, non-ridiculous research question here, I promise -- I'm just a little bit uncomfortable posting what I'm working on on the internet in ...
3
votes
0answers
115 views
Are GAMMs/GLM the best choice for calculating number of germs on hands?
We would like your opinion on whether GAMMs are a good option and how best to go about implementing for the following:
During a period of patient care, a nurse will accrue $Y$ colonies of bacteria on ...
0
votes
0answers
27 views
complicated model without a huge dataset
I've got a set of data that I'm trying to model. Lots of the data is missing, so I'm using multiple imputation. I've got about 360 observations and 13 variables. I'm also using GAMs, but that ...
0
votes
0answers
15 views
orthogonal contrast with an ordinal variable in gam
I am fitting a set of continuous and factor variables into a GAM. The factors are ordinal: they are levels of abundance of specific macroinvertebrates set as "none" (0% cover), "low" (>0-10% cover) ...
3
votes
1answer
80 views
Identify if there is a relationship between two data sets
I am by no means a mathematician (I am a software developer by trade), but I am trying to find out if there is a relationship between two data sets. I have referral sources the provide us customers, ...
0
votes
0answers
31 views
Predictive modeling - graspeR
I would like to run a GAM with the graspeR package because I know its possibilities for mapping outputs based on GAM models.
The main issue in my state of art is ...
2
votes
0answers
46 views
Algorithm for selecting interactions without very many degrees of freedom (mgcv, gam)
I've got a semi-parametric model that I'm fitting with GAM's (mgcv in R). It is of the form
$$y = \theta + X'\beta + f(Z) + \text{Interactions!} + \epsilon$$
I've got 289 observations.
Many of ...
1
vote
0answers
106 views
Selecting GAM with/without random effects - residual plots vs. AIC
My question is about fitting GAMs with a random effect in mgcv, using s(x, bs="re"). I understand that determining the random effects structure should occur before determining the fixed effects ...
1
vote
0answers
21 views
case down-weighted to emulate equal presence and absences
In GAM-based logistic regression pseudo-absence data is necessary to fit the model with corresponent presence data. In many cases, pseudo-absence data are generated 10 times more than presence records ...
1
vote
0answers
50 views
What might be wrong when my gamm fit is perfectly linear despite my spline term?
I'm using Wood's gamm4 R package and I run:
...
1
vote
1answer
115 views
GLM and GAM package alternative to GRASP in R?
I am looking for the best package providing Generalized Linear Models (GLM) and General Additive Models (GAM) for spatial data. The most widely recommended (GRASP) is no longer current in the ...
2
votes
0answers
170 views
Marginal effects with logistic generalized additive model in R
I am currently working with a logistic semi-parametric model in R using the mgcv package. The output from the model gives the standard log-odds coefficients; however, reviewers have requested ...
3
votes
0answers
70 views
GAM sample size
A common rule of thumb in social science is to have at least $30$ observations for regression (without any complicated effects). Does someone know such rule of thumb for GAMs? Are $50$ observations ...
2
votes
0answers
226 views
GAM cross-validation to test prediction error
My questions deals with GAMs in the mgcv R package. Due to a small sample size I want to determine the prediction error using leave-one-out cross-validation. Is this reasonable? Is there a package or ...
4
votes
1answer
258 views
Interpretation of plotted component smooth functions of generalized additive model - transformed variables
I have a plot of a GAM which models deforestation severity.
The explanatory variables are transformed, with log10, inverse, and square root. Is it meaningful to interpret a gradient like this: ...
17
votes
3answers
711 views
Why does including latitude and longitude in a GAM account for spatial autocorrelation?
I have produced generalized additive models for deforestation. To account for spatial-autocorrelation, I have included latitude and longitude as a smoothed, interaction term (i.e. s(x,y)).
I've based ...
4
votes
0answers
191 views
Modeling a spline over time — design matrix and survey of approaches
A response variable y is a nonlinear function of a number of predictor variables X (in my real data the response is binomially distributed, but here I'm using a normally-distributed value for ...
0
votes
0answers
99 views
Comparing multiple models using the same explanatory variables [closed]
I have 5 GAMs, each one using a subset of my data, defined by quantiles. The response/explanitory variables are the same in each case, but the deviance explained by each in each model differs, along ...
2
votes
2answers
158 views
Comparing multiple models using the same explanatory variables
Using mgcv I have made 5 models, each one using a subset of my data, defined by quantiles. The response/explanitory variables are the same in each case, but the ...
1
vote
1answer
134 views
Centering constraints for regression - specifically GAM
I asked the following question and (don't think) really received a thorough answer. I qualify my impression about the suitability of the answer, because perhaps I am lacking pre-requisite knowledge.
...
0
votes
0answers
194 views
te( ) interactions and AIC model selection with GAM in R
I'm working with a time-series of several years and to analyze it, I’m using GAM smoothers from the package mgcv. I’m constructing models where zooplankton biomass ...
0
votes
1answer
140 views
Centering constraints in MGCV GAM
The help pages for MGCV in R states the following:
Note that when using factor by variables, centering constraints are
applied to the smooths, which usually means that the by variable
should ...
1
vote
2answers
390 views
Confidence interval for gam model
Reading mgcv::gam's help page:
"confidence/credible intervals are readily available for any quantity predicted using a fitted model"
However I can't figure a way to actually get one. I thought ...
5
votes
1answer
309 views
Build a covariance matrix for GAM
I am using a GAM in R to compare time series data from 3 countries. The data sets are of hourly measurements for one year. The main aim here is to show when at which time of the day and day of the ...
4
votes
2answers
622 views
How to include an interaction term in GAM?
The following code evaluates the similarity between two time series:
...
2
votes
1answer
141 views
What is the mathematical model formula corresponding to this gam model fit in R?
If I have a generalised additive model how would I write this in the correct manner in a scientific paper? For example:
...
1
vote
2answers
483 views
Plotting gam model output - not component smooth functions
I aim to model the temperature variations in two locations in America, example below:
...
0
votes
2answers
192 views
Plotting a logistic GAM model in R - why is the scale not 0-1?
I have fit a simple binary logistic GAM model in R and have used the plot() function to plot the results of this model. The outputted graph shows a fitted line and a confidence interval, but the ...
1
vote
0answers
51 views
Question about aggregated data and the effect on specific contributors
I have a set of data about the incidence of certain types of infections that occur in hospitals. The analysis has looked at the incidence trend for all aggregated results in a time series. This uses a ...
6
votes
1answer
183 views
Are both of these generalized additive models?
I've been reading about generalised additive models. I've been using this data (which is a reformatted version of data from Hastie's website), and running my code in R. This data essentially consists ...
2
votes
2answers
137 views
R sparse smoothing splines
I would like to fit a model of the form weight ~ bs(height) + id, where id is a factor (so I have several observations per every id). There are perhaps 100k values ...
4
votes
1answer
369 views
Interactions between non-linear predictors
I have data on 70,000 students, nested in 120 schools. I'm starting with fixed effects for the schools, but at some point I might start letting intercepts and slopes vary.
Some key predictors ...
