Skip to main content
5 votes
Accepted

Confusion about what is treated as the "reference" level in GAM using by= ordered factor in smooth

This is an infelicity in gratia that I haven't thought enough about as yet. Your ordered factor code is correct; it's gratia that doesn't know enough to label the first smooth as belonging to ...
Gavin Simpson's user avatar
4 votes

When to choose GAM over GLMM and how to include random effect into GAM

Answer to OP's Original Question This part of the question originally addressed OP's question about overdispersion and conventional residual plots from separate count models. See edit to see response ...
Shawn Hemelstrand's user avatar
3 votes

Factor-smooth interactions in generalized additive models

The obvious difference would be that the two separate models wouldn't include the covariances between the two smooths. So there would be no way to statistically compare the two estimated smooths. FYI: ...
Gavin Simpson's user avatar
2 votes
Accepted

Modelling spatial autocorrelation with GAMs

The quote Trend surface GAM (Hastie and Tibshirani 1990, Wood2006) does not address the problem of spatial autocorrelation, but merely accounts for trends in the data across larger geographical ...
Gavin Simpson's user avatar
1 vote

My data is clustered in space, how can I account for that in a GAMM?

What you are describing is called spatial autocorrelation: Observations physically closer to each other are assumed to be more strongly correlated to each other. A common approach is to either: ...
Frans Rodenburg's user avatar
1 vote

Generalized additive model which interacts with mean of response

Some thoughts, along the lines of @Michael M: If you can assign the fitted prices to a category, you can use that same process, surely (!), to place the observed house prices into the same categories....
Gavin Simpson's user avatar
1 vote
Accepted

Issue fitting and plotting GAM with soap film smoother

I have gone through your posted code and have a couple of comments/ideas here: The boundary object that you're supplying does not have the variable f in each ...
Benjamin Hlina's user avatar
1 vote

Issue fitting and plotting GAM with soap film smoother

One thing I notice here is that the model is not predicting all zeros, there is a hotspot around x = 495000. So it is actually working it is just overestimating in that one spot. You might consider ...
Robert Lennox's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible