n_draw.bage_mod: Get the Number of Draws for a Model Object

View source: R/bage_mod-methods.R

n_draw.bage_modR Documentation

Get the Number of Draws for a Model Object

Description

Get the value of n_draw for a model object. n_draw controls the number of posterior draws that are generated by functions such as augment() and components().

Usage

## S3 method for class 'bage_mod'
n_draw(x)

Arguments

x

An object of class "bage_mod", created using mod_pois(), mod_binom(), or mod_norm().

Value

An integer

See Also

  • set_n_draw() Modify the value of n_draw

  • mod_pois(),mod_binom(),mod_norm() Create a model object

Examples

mod <- mod_pois(injuries ~ age:sex + ethnicity + year,
                data = nzl_injuries,
                exposure = popn)
n_draw(mod)
mod <- mod |>
  set_n_draw(n_draw = 5000)
n_draw(mod)

bage documentation built on Nov. 5, 2025, 5:33 p.m.