Extracting the coefficients of a GAM model #320
Unanswered
onetimestats2024
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello!
I simulated some data in R and tried to fit a GAM regression model. The model ran successfully and here are the results:
The visuals look like this:
I am wondering - is it possible to extract the coefficients of this regression model in R? For example, I want to get access to the (approximate) mathematical function that is used to draw each of these colored curves.
Can this be done in R? Ideally, I would like to be able to extract all the coefficients from the output of this GAM model after running the R code and recreate these plots myself (i.e. the colored lines).
(the reason I am asking is because later I might need to take a numerical derivative of these functions)
Beta Was this translation helpful? Give feedback.
All reactions