Description Usage Arguments Value Author(s) Examples
View source: R/normal_update.R
Finds the parameters of the normal posterior with normal data and a normal prior
1 | normal_update(prior, data, teach=FALSE)
|
prior |
vector with components mean and sd of the normal prior |
data |
vector with components the sample mean and the standard error of the estimate |
teach |
logical variable indicating the form of the output |
If teach = TRUE, returns data frame that displays the mean, precision, and standard deviation for the prior, data, and posterior. If teach = FALSE, returns a vector with mean and standard deviation of the posterior.
Jim Albert
1 2 3 4 | prior <- c(100, 10)
data <- c(110, 15)
normal_update(prior, data)
normal_update(prior, data, teach=TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.