Description Usage Arguments Value See Also Examples
View source: R/tadaa_one_sample.R
If sigma
is omitted, the function will just perform a one-sample stats::t.test,
but if sigma
is provided, a z-test is performed. It basically works the same way,
except that we pretend we know the population sigma and use the normal distribution
for comparison.
1 2 3 4 5 6 7 8 9 10 |
data |
A |
x |
A numeric vector or bare column name of |
mu |
The true mean (μ) to test for. |
sigma |
Population sigma. If supplied, a z-test is performed, otherwise a one-sample stats::t.test is performed. |
direction |
Test direction, like |
na.rm |
Whether to drop |
conf.level |
Confidence level used for power and CI, default is |
print |
Print method, default |
A data.frame
by default, otherwise dust
object, depending on print
.
Other Tadaa-functions:
tadaa_aov()
,
tadaa_chisq()
,
tadaa_kruskal()
,
tadaa_levene()
,
tadaa_nom()
,
tadaa_ord()
,
tadaa_pairwise_tukey()
,
tadaa_pairwise_t()
,
tadaa_t.test()
,
tadaa_wilcoxon()
1 2 3 4 5 6 7 | set.seed(42)
df <- data.frame(x = rnorm(n = 20, mean = 100, sd = 1))
tadaa_one_sample(df, x, mu = 101, sigma = 1)
# No data.frame, just a vector
tadaa_one_sample(x = rnorm(20), mu = 0)
|
sh: 1: cannot create /dev/null: Permission denied
sh: 1: wc: Permission denied
Could not detect number of cores, defaulting to 1.
estimate statistic se p.value conf.low conf.high method
1 100.1919 -3.613844 0.2236068 0.0003016912 70.61548 129.7684 z-Test
alternative d power
1 two.sided -0.80808 0.950924
estimate statistic p.value parameter conf.low conf.high
1 -0.2709918 -1.092153 0.2884214 19 -0.7903258 0.2483422
method alternative se d power
1 One Sample t-test two.sided 0.2481262 -0.2442129 0.1795264
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.