Skip to contents

Generate draws from priors for model terms. The terms are assumed to be main effects, except in the case of dynamic SVD priors (eg SVD_RW()) where they assumed to be age-time interactions.

Usage

# S3 method for class 'bage_prior_ar'
generate(x, n = 20, n_draw = 25, ...)

# S3 method for class 'bage_prior_known'
generate(x, n = 20, n_draw = 25, ...)

# S3 method for class 'bage_prior_norm'
generate(x, n = 20, n_draw = 25, ...)

# S3 method for class 'bage_prior_normfixed'
generate(x, n = 20, n_draw = 25, ...)

# S3 method for class 'bage_prior_rw'
generate(x, n = 20, n_draw = 25, ...)

# S3 method for class 'bage_prior_rwseasfix'
generate(x, n = 20, n_draw = 25, ...)

# S3 method for class 'bage_prior_rw2'
generate(x, n = 20, n_draw = 25, ...)

Arguments

x

Object of class "bage_prior"

n

Number of elements in term. Default is 20.

n_draw

Number of draws. Default is 25.

...

Unused. Included for generic consistency only.

Value

A tibble

See also

Examples

rw <- RW()
generate(rw)
#> # A tibble: 500 × 3
#>        x  draw   value
#>    <int> <int>   <dbl>
#>  1     1     1  0     
#>  2     2     1 -0.264 
#>  3     3     1  0.0195
#>  4     4     1 -0.0368
#>  5     5     1 -0.284 
#>  6     6     1  0.0514
#>  7     7     1 -0.557 
#>  8     8     1  0.143 
#>  9     9     1  0.170 
#> 10    10     1  0.0578
#> # ℹ 490 more rows