-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for penalized splines/GAMs #51
Comments
I will have to find time to figure out how exactly thin plate splines are incorporated into the model. An alternative might be to use restricted cubic splines, as illustrated here: https://www.metafor-project.org/doku.php/tips:non_linear_meta_regression The nice thing is that this just requires creating transformations of the original predictor variable, which can then be added to the model as additional predictors in the usual manner (and one could add random slopes for them as well). If this is how these thin plate splines work, then it would be the same principle. |
The way the splines are implemented is with a design matrix and penalty matrix. The major benefit over restricted cubic splines is that I could include inner/outer-style random effects for the splines via a tensor product of splines for the year and the grouping factor. |
I would have to really study the details, but I suspect that this will not currently be possible with the way things work in metafor. |
I happened to have taken Gavin Simpson's excellent course on GAMs in the meantime. So, in principle, one can do the same thing as in the example linked to above with restricted cubic splines. I have expanded the example to illustrate this with a thin plate spline model. However, |
Classification:
Feature Request
Summary
I'm interested in being able to fit meta-analysis models with penalized splines, ala
mgcv::gam()
. For example, I have a meta-analytic dataset where we want to model change in effect sizes over time using thin plate splines, with Country random effects in both intercepts and the year splines.Here is how I might fit such a model with brms by using mgcv's tensor product spline implementation.
Is there any possibility that these sorts of penalized splines might be supported in metafor?
The text was updated successfully, but these errors were encountered: