Learn R Programming

dalmatian (version 1.0.0)

plot.dalmatian: Plot Function for dalmatian objects

Description

Create traceplots and caterpillar plots from output of the fitted model.

Usage

# S3 method for dalmatian
plot(
  x,
  trace = TRUE,
  caterpillar = TRUE,
  show = TRUE,
  return_plots = FALSE,
  ...
)

Arguments

x

Object of class dalmatian created by dalmatian().

trace

If TRUE (default) then generate traceplots.

caterpillar

If TRUE (default) then generate caterpillar plots

show

If TRUE (default) then display plots as they are generated.

return_plots

If TRUE (not default) return a list of ggplot objects representing the plots.

...

Ignored

Value

List of ggplot objects if return_plots is true.

Details

This function is a wrapper for the functions traceplots.dalmatian() and caterpillar.dalmatian() which create traceplots and caterpillar plots of all variables stored by the sampler. Further control is available by calling these functions directly.

References

Bonner, S., Kim, H., Westneat, D., Mutzel, A., Wright, J., and Schofield, M.. (2021). dalmatian: A Package for Fitting Double Hierarchical Linear Models in R via JAGS and nimble. Journal of Statistical Software, 100, 10, 1--25. 10.18637/jss.v100.i10.

Examples

Run this code
# NOT RUN {
## Plot results for pied-flycatcher model without random effects
plot(pfresults)

## Plot results for pied-flycatcher model with random effects
plot(pfresults2)
# }

Run the code above in your browser using DataLab