View source: R/bage_prior-methods.R
generate.bage_prior_ar | R Documentation |
Generate draws from priors for model terms.
## S3 method for class 'bage_prior_ar'
generate(x, n_along = 20, n_by = 1, n_draw = 25, ...)
## S3 method for class 'bage_prior_known'
generate(x, n_element = 20, n_draw = 25, ...)
## S3 method for class 'bage_prior_lin'
generate(x, n_along = 20, n_by = 1, n_draw = 25, ...)
## S3 method for class 'bage_prior_linar'
generate(x, n_along = 20, n_by = 1, n_draw = 25, ...)
## S3 method for class 'bage_prior_linex'
generate(x, n_along = 20, n_by = 1, n_draw = 25, ...)
## S3 method for class 'bage_prior_norm'
generate(x, n_element = 20, n_draw = 25, ...)
## S3 method for class 'bage_prior_normfixed'
generate(x, n_element = 20, n_draw = 25, ...)
## S3 method for class 'bage_prior_rwrandom'
generate(x, n_along = 20, n_by = 1, n_draw = 25, ...)
## S3 method for class 'bage_prior_rwrandomseasfix'
generate(x, n_along = 20, n_by = 1, n_draw = 25, ...)
## S3 method for class 'bage_prior_rwrandomseasvary'
generate(x, n_along = 20, n_by = 1, n_draw = 25, ...)
## S3 method for class 'bage_prior_rwzero'
generate(x, n_along = 20, n_by = 1, n_draw = 25, ...)
## S3 method for class 'bage_prior_rwzeroseasfix'
generate(x, n_along = 20, n_by = 1, n_draw = 25, ...)
## S3 method for class 'bage_prior_rwzeroseasvary'
generate(x, n_along = 20, n_by = 1, n_draw = 25, ...)
## S3 method for class 'bage_prior_rw2random'
generate(x, n_along = 20, n_by = 1, n_draw = 25, ...)
## S3 method for class 'bage_prior_rw2randomseasfix'
generate(x, n_along = 20, n_by = 1, n_draw = 25, ...)
## S3 method for class 'bage_prior_rw2randomseasvary'
generate(x, n_along = 20, n_by = 1, n_draw = 25, ...)
## S3 method for class 'bage_prior_rw2zero'
generate(x, n_along = 20, n_by = 1, n_draw = 25, ...)
## S3 method for class 'bage_prior_rw2zeroseasfix'
generate(x, n_along = 20, n_by = 1, n_draw = 25, ...)
## S3 method for class 'bage_prior_rw2zeroseasvary'
generate(x, n_along = 20, n_by = 1, n_draw = 25, ...)
## S3 method for class 'bage_prior_spline'
generate(x, n_along = 20, n_by = 1, n_draw = 25, ...)
## S3 method for class 'bage_prior_svd'
generate(x, n_element = 1, n_draw = 25, ...)
## S3 method for class 'bage_prior_svd_ar'
generate(x, n_along = 5, n_by = 1, n_draw = 25, ...)
## S3 method for class 'bage_prior_svd_rwrandom'
generate(x, n_along = 5, n_by = 1, n_draw = 25, ...)
## S3 method for class 'bage_prior_svd_rwzero'
generate(x, n_along = 5, n_by = 1, n_draw = 25, ...)
## S3 method for class 'bage_prior_svd_rw2random'
generate(x, n_along = 5, n_by = 1, n_draw = 25, ...)
## S3 method for class 'bage_prior_svd_rw2zero'
generate(x, n_along = 5, n_by = 1, n_draw = 25, ...)
x |
Object of class |
n_along |
Number of elements of
'along' dimension. Default is |
n_by |
Number of combinations of
'by' variables. Default is |
n_draw |
Number of draws. Default
is |
... |
Unused. Included for generic consistency only. |
n_element |
Number of elements in term,
in priors that do not distinguish
'along' and 'by' dimensions.
Default is |
Some priors distinguish between 'along' and 'by'
dimensions, while others do not: see priors
for a complete list. Arguments n_along
and n_by
are used with priors that make the distinction,
and argument n_element
is used with priors that do not.
A tibble
priors Overview of priors implemented in bage
## prior that distinguishes 'along' and 'by'
x <- RW()
generate(x, n_along = 10, n_by = 2)
## prior that does not distinguish
x <- N()
generate(x, n_element = 20)
## SVD_AR(), SVD_RW(), and SVD_RW2()
## distinguish 'along' and 'by'
x <- SVD_AR(HFD)
generate(x, n_along = 5, n_by = 2)
## SVD() does not
x <- SVD(HFD)
generate(x, n_element = 10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.