I am trying to get a handle on using s() terms in brms. I have read around the forum and various helpful places like Gavin SImpson’s blog, but I am still having trouble understanding the output from a model in brms where I use an s() term.
I understand that the sds() is a varying effect that controls the ‘wiggliness’ of the spline. The s term in the ‘Population-level’ effects is the completely smooth part. But what does this mean?? Is there any directly interpretable meaning from the numbers in the model output?
Below is a very simple example.
time<-seq(from=0, to=10, by=0.1) a <- 10 b <- -1 mu = a + b*time^3 outcome <- rnorm(101, mu, 40) data <- cbind(time, outcome) data <- data.frame(data) plot(outcome ~ time, data=data) m.s <- brm(outcome ~ s(time, k=20), data=data, cores=4) m.s
Here is the resulting output in case you don’t want to run the code for yourself, along with some plots of the data and conditional_smooths() from the model fit.
‘stime_1’ estimate is -3300. Does this have any interpretable meaning just by looking at this output?
‘sds(stime_1)’ estimate is 302, which I take as the sd of the varying effects for the smooth term. Seems wiggly, but how do I interpret 302?
Also, I have been unable to find the interpretation of the y-axis for conditional_smooths(). If one uses conditional_effects() then the fit is on the scale of the data, but I am not sure how to interpret conditional_smooths().
I could estimate the slope (first derivative) of the spline along points in time using a finite differences approach using fitted() and some new data… but are plots, predictions, and derivatives the only meaningful way to interpret these? Or is the model output itself interpretable too?
Thanks so much! I realize these may be dumb, basic and obvious questions. Hopefully they are not redundant to other posts on the forum, but I think it would be helpful to others if these questions were answered in a single spot (maybe they are somewhere obvious and I haven’t found them!).