Skip to contents

After calling a function such as mod_pois() or set_prior() it is good practice to print the model object at the console, to check the model's structure. The output from print() has the following components:

  • A header giving the class of the model and noting whether the model has been fitted.

  • A formula giving the outcome variable and terms for the model.

  • Priors for each model term.

  • A table giving the number of parameters, and (fitted models only) the standard deviation across those parameters, a measure of the term's importance.

  • Values for other model settings.

Usage

# S3 method for class 'bage_mod'
print(x, ...)

Arguments

x

Object of class "bage_mod", typically created with mod_pois(), mod_binom(), or mod_norm().

...

Unused. Included for generic consistency only.

Value

x, invisibly.

See also

Examples

mod <- mod_pois(injuries ~ age + sex + year,
                data = injuries,
                exposure = popn)

## print unfitted model
mod
#> -- Unfitted Poisson model --
#> 
#>    injuries ~ age + sex + year
#> 
#> (Intercept) ~ NFix()
#>         age ~ RW()
#>         sex ~ NFix()
#>        year ~ RW()
#> 
#>  term n_par n_par_free
#>   age    12         12
#>   sex     2          2
#>  year    19         19
#> 
#>      dispersion: mean=1
#>        exposure: popn
#>         var_age: age
#>   var_sexgender: sex
#>        var_time: year
#>          n_draw: 1000

mod <- fit(mod)

## print fitted model
mod
#> -- Fitted Poisson model --
#> 
#>    injuries ~ age + sex + year
#> 
#> (Intercept) ~ NFix()
#>         age ~ RW()
#>         sex ~ NFix()
#>        year ~ RW()
#> 
#>  term n_par n_par_free std_dev
#>   age    12         12   0.760
#>   sex     2          2   0.720
#>  year    19         19   0.081
#> 
#>      dispersion: mean=1
#>        exposure: popn
#>         var_age: age
#>   var_sexgender: sex
#>        var_time: year
#>          n_draw: 1000