# NOT RUN {
## Generate some data.
d <- GAMart()
## Model formula.
f <- list(
num ~ s(x1) + s(x2) + s(x3) + te(lon,lat),
sigma ~ s(x2) + te(lon,lat)
)
## Estimate model.
b <- bamlss(f, data = d)
## Effect plots
plot(b, ask = FALSE)
plot(b, model = "mu")
plot(b, model = "sigma", term = "te(lon,lat)")
## Trace plots.
plot(b, which = "samples")
## Residual plots.
plot(b, which = 3:4)
# }
Run the code above in your browser using DataCamp Workspace