tidy.disbayes {disbayes}R Documentation

Form a tidy data frame from the estimates from a disbayes fit

Description

Simply call this after fitting disbayes, as, e.g.

res <- disbayes(...)
tidy(res)

Usage

## S3 method for class 'disbayes'
tidy(x, startyear = 1, ...)

## S3 method for class 'disbayes_hier'
tidy(x, ...)

Arguments

x

Object returned by disbayes

startyear

Only used for models with time trends. Numeric year represented by year 1 in the data. For example, set this to 1918 to convert years 1-100 to years 1918-2017.

...

Other arguments (currently unused)

Value

A data frame with one row per model parameter, giving summary statistics for the posterior distribution for that parameter. For array parameters, e.g. those that depend on age or area, then the age and area are returned in separate columns, to make it easier to summarise and plot the results, e.g. using ggplot2.

Model parameters might include, depending on the model specification,

For models with time trends:

Only for hierarchical models:

Functions


[Package disbayes version 1.1.0 Index]