Description Usage Arguments Details Examples
Adds random sampled lines from a blm
object to an existing plot.
1 | add_sample_lines(object, n = 5, sample_from_prior = FALSE, ...)
|
object |
a |
n |
number of lines to show |
sample_from_prior |
draw samples from the prior distribution? |
... |
additional arguments passed to lines |
Draws random samples from the posterior (or prior if
sample_from_prior = TRUE) distribution of blm
object.
Requires the mvrnorm from the MASS package for random sampling. NOTE: only
works for straight lines, assuming first and second coefficient are
intercept and slope.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.