get_est | R Documentation |
Getter functions for estimate()
vectors.
The posterior::rvar class may be useful in handling standard errors for
more complicated mathematical expressions. This function assumes a Normal
distribution centered on the estimate, with standard deviation equal to the
standard error of the estimate. The posterior
package is required for this
function.
get_est(x)
get_se(x)
get_moe(x, conf = 0.9)
to_rvar(x, n = 500)
x |
An estimate vector. |
conf |
The confidence level to use in constructing the margin of error. |
n |
How many samples to draw. |
An estimate vector.
A posterior::rvar vector.
x = estimate(1, 0.1)
get_est(x)
get_moe(x)
x = estimate(1, 0.1)
if (requireNamespace("posterior", quietly=TRUE)) {
rv_x = to_rvar(x)
(rv_x^2 / rv_x) - rv_x # std. errors zero (correct)
x^2 / x - x # std. errors not zero
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.