estimate_mean.RdEstimate the sample mean
estimate_mean(x, y, ...) # S3 method for default estimate_mean(x, y, ...) # S3 method for formula estimate_mean(x, y, data, ...)
| x | a vector of values or a formula |
|---|---|
| y | optional, a grouping vector |
| ... | additional arguments passed to child functions |
| data | optional location to find formula values |
a posterior distribution for the mean
default: Default method
formula: Method for a formula
post <- estimate_mean(rnorm(100, 50, 5)) summary(post) #> #> Iterations = 1001:2000 #> Thinning interval = 1 #> Number of chains = 1 #> Sample size per chain = 1000 #> #> 1. Empirical mean and standard deviation for each variable, #> plus standard error of the mean: #> #> Mean SD Naive SE Time-series SE #> mu 50.00 0.4551 0.01439 0.01347 #> sigma2 21.03 2.9734 0.09403 0.08882 #> #> 2. Quantiles for each variable: #> #> 2.5% 25% 50% 75% 97.5% #> mu 49.05 49.71 49.99 50.31 50.88 #> sigma2 15.99 18.99 20.78 22.80 27.56 #> plot(post)![]()