Blog Archives

Fitting GAMs with brms: part 1

April 21, 2018
By
Fitting GAMs with brms: part 1

Regular readers will know that I have a somewhat unhealthy relationship with GAMs and the mgcv package. I use these models all the time in my research but recently we’ve been hitting the limits of the range of models that mgcv can fit. So I’ve been looking into alternative ways to fit the GAMs I want to fit but...

Read more »

Comparing smooths in factor-smooth interactions II

December 14, 2017
By
Comparing smooths in factor-smooth interactions II

In a previous post I looked at an approach for computing the differences between smooths estimated as part of a factor-smooth interaction using s()’s by argument. When a common-or-garden factor variable is passed to by, gam() estimates a separate smooth for each level of the by factor. Using the (Xp) matrix approach, we previously saw that we can post-process...

Read more »

First steps with MRF smooths

October 19, 2017
By
First steps with MRF smooths

One of the specialist smoother types in the mgcv package is the Markov Random Field (MRF) smooth. This smoother essentially allows you to model spatial data with an intrinsic Gaussian Markov random field (GMRF). GRMFs are often used for spatial data measured over discrete spatial regions. MRFs are quite flexible as you can think about them as representing an...

Read more »

First steps with MRF smooths

October 19, 2017
By
First steps with MRF smooths

One of the specialist smoother types in the mgcv package is the Markov Random Field (MFR) smooth. This smoother essentially allows you to model spatial data with an intrinsic Gaussian Markov random field (GMRF). GRMFs are often used for spatial data measured over discrete spatial regions. MRFs are quite flexible as you can think about them as representing an...

Read more »

Comparing smooths in factor-smooth interactions I

October 10, 2017
By
Comparing smooths in factor-smooth interactions I

One of the really appealing features of the mgcv package for fitting GAMs is the functionality it exposes for fitting quite complex models, models that lie well beyond what many of us may have learned about what GAMs can do. One of those features that I use a lot is the ability to model the smooth effects of some...

Read more »

Comparing smooths in factor-smooth interactions I

October 10, 2017
By
Comparing smooths in factor-smooth interactions I

One of the really appealing features of the mgcv package for fitting GAMs is the functionality it exposes for fitting quite complex models, models that lie well beyond what many of us may have learned about what GAMs can do. One of those features that I use a lot is the ability to model the smooth effects of some...

Read more »

Fitting count and zero-inflated count GLMMs with mgcv

May 4, 2017
By
Fitting count and zero-inflated count GLMMs with mgcv

A couple of days ago, Molly Brooks and coauthors posted a preprint on BioRχiv illustrating the use of the glmmTMB R package for fitting zero-inflated GLMMs (Brooks et al., 2017). In the paper, glmmTMB is compared with several other GLMM-fitting packages. mgcv has recently gained the ability to fit a wider range of families beyond the exponential family of...

Read more »

Fitting count and zero-inflated count GLMMs with mgcv

May 4, 2017
By
Fitting count and zero-inflated count GLMMs with mgcv

A couple of days ago, Mollie Brooks and coauthors posted a preprint on BioRχiv illustrating the use of the glmmTMB R package for fitting zero-inflated GLMMs (Brooks et al., 2017). In the paper, glmmTMB is compared with several other GLMM-fitting packages. mgcv has recently gained the ability to fit a wider range of families beyond the exponential family of...

Read more »

Prediction intervals for GLMs part II

May 1, 2017
By
Prediction intervals for GLMs part II

One of my more popular answers on StackOverflow concerns the issue of prediction intervals for a generalized linear model (GLM). Comments, even on StackOverflow, aren’t a good place for a discussion so I thought I’d post something hereon my blog that went into a bit more detail as to why, for some common types of GLMs, prediction intervals aren’t...

Read more »

Prediction intervals for GLMs part II

May 1, 2017
By
Prediction intervals for GLMs part II

One of my more popular answers on StackOverflow concerns the issue of prediction intervals for a generalized linear model (GLM). Comments, even on StackOverflow, aren’t a good place for a discussion so I thought I’d post something hereon my blog that went into a bit more detail as to why, for some common types of GLMs, prediction intervals aren’t...

Read more »

Search R-bloggers


Sponsors

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)