Description Usage Arguments Details Value Examples
View source: R/descriptive_stats.R
prec_mean
returns the sample size or the precision for the provided
mean and standard deviation
1 2 |
mu |
mean |
sd |
standard deviation |
n |
number of observations |
conf.width |
precision (the full width of the conficende interval) |
conf.level |
confidence level |
tol |
numerical tolerance used in root finding, the default providing (at least) four significant digits |
Exactly one of the parameters n, conf.width
must be passed as NULL,
and that parameter is determined from the other.
The precision is defined as the full width of the conficence interval. The confidence interval calculated as t(n - 1) * sd / sqrt(n), with t(n-1) from the t-distribution with n-1 degrees of freedom.
uniroot
is used to solve n
.
Object of class "presize", a list with
mean
standard deviation
sample size
precision (the width of the conficence interval)
lower end of confidence interval
higher end of confidence interval
augmented with method and note elements.
1 2 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.