I have fitted a model in R programming language. My dependent variable is disease severity and my predictors are weather variables. How can I write this model in mathematical form for a manuscript? Is there a package which can help me write this in mathematical form? I will be making my GitHub repository available, but the idea is to write just model formula in a manuscript. Thank you!
mod1 <- gam(severity ~ s(mean_rh, k = 8) + s(mean_temp, k = 10) + s(mean_ws, k =7) + s(rain, k = 7), family = betar(), data = data)
summary(mod1)
s()term in agam()model. @JohnMadden this question is about a simple sum of additives()terms, so the difficulty in the linked answer holds here. If regression splines has been specified viabs="cr"within thes()terms, then a formula would be possible (albeit messy). – EdM Jan 28 '23 at 16:16smooth.termsin themgcvmanual explains that with the default thin-plate spline "a truncated eigen-decomposition is used to achieve the rank reduction," which leads to basis functions that are hard to interpret and would unnecessarily complicate the presentation in a manuscript. For presentation in a manuscript, as this question proposes, a simple statement of the model formula via thes()terms would be most intelligible. In this additive model, plots of outcome versus predictors would illustrate. – EdM Jan 28 '23 at 16:30For presentation in a manuscript, as this question proposes, a simple statement of the model formula via the s() terms would be most intelligible. Are you proposing to write the exact R code that I posted above in the manuscript? I haven't come across this form of presentation yet. Thanks – Ahsk Jan 28 '23 at 16:33s()terms mean, show a summary of the model output, and plot outcomes as functions of predictors. If you had used cubic regression splines with defined knots (thin-plate spline don't have knots in the usual sense) then you could get a formula, but it would have a very large number of terms with 4 spline-fitted predictors. Also, note that this additive model does not include interaction terms, which I think you have found to be important with this data set. – EdM Jan 28 '23 at 16:47