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:

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 = nzl_injuries,
                exposure = popn)

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

mod <- fit(mod)

## print fitted model
mod
#> 
#>     ------ Fitted Poisson model ------
#> 
#> 
#>    injuries ~ age + sex + year
#> 
#>   exposure = popn
#> 
#> 
#>         term  prior along n_par n_par_free std_dev
#>  (Intercept) NFix()     -     1          1       -
#>          age   RW()   age    12         11    0.76
#>          sex NFix()     -     2          2    0.72
#>         year   RW()  year    19         18    0.08
#> 
#> 
#>  n_draw pr_mean_disp var_time var_age var_sexgender optimizer
#>    1000            1     year     age           sex    nlminb
#> 
#> 
#>  time_total time_optim time_draws iter converged                    message
#>        0.18       0.08       0.00   12      TRUE   relative convergence (4)
#>