Description Usage Arguments Details Value See Also Examples
test_means_within()
compares two sample means obtained from the same group of users and performs a two-sided statistical test to determine if the means differ from each other.
test_means_within
, ab_test_within
, and test_times_within
are synonyms.
1 | test_times_within(.x, ...)
|
.x |
A single numeric value (i.e., the difference of two means) or a long-format data frame with named columns of numeric data corresponding to the variables being tested. See Details. |
... |
(Optional) If |
If .x
is a single numeric value representing the mean of differences from the sample scores, .sd
should be a single numeric value representing the standard deviation of the difference scores.
If .x
is a single numeric value representing the mean of differences from the sample scores, .n
should be a single numeric value representing the number of pairs that derived the difference scores.
If .x
is a data frame, .var1
and .var2
should be the unquoted names of the columns containing the raw scores obtained.
You can modify the alpha level to adjust confidence intervals by including .alpha
as a named argument and providing a numeric value: e.g., .aplha = 0.001
.
If you're passing a data frame to .x
, you can optionally pass one or more grouping variables as unquoted, comma-separated column names (without naming the ...
argument) to compute stats by groups.
Note that NAs
are automatically dropped in all calculations.
A tibble with the results of a test of two means, with confidence interval information, and other information.
Other tests comparing means:
test_means_between()
1 2 3 4 5 6 7 8 9 10 11 12 | # When you have computed difference metrics in advance:
test_means_within(45,9.2,18)
.ux_data <-
data.frame(
"id" = rep(seq(1,20,1),2),
"task" = c(rep(1,20),rep(2,20)),
"score1" = sample(1:7,40,TRUE),
"score2" = sample(1.5:7.5,40,TRUE)
)
test_means_within(.ux_data, score1, score2, task, .alpha=0.1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.