# NOT RUN {
## Generate data.
d <- GAMart()
## Estimate model.
b <- bamlss(num ~ s(x1) + s(x2) + s(x3), data = d)
## Extract samples for "s(x2)".
sa <- samples(b, term = "s(x2)")
head(sa)
## Trace plot.
plot(sa)
# }
Run the code above in your browser using DataCamp Workspace