Description Usage Arguments Details Value See Also Examples
View source: R/time_stats-function.R
Following Sauro and Lewis (2012), time_stats()
takes the sample size into account when computing stats on time data.
1 2 3 4 5 6 7 | time_stats(.x, ...)
## S3 method for class 'numeric'
time_stats(.x, ..., .alpha = 0.05)
## S3 method for class 'data.frame'
time_stats(.x, .var, ..., .alpha = 0.05)
|
.x |
A vector or long-format data frame with a named column of numeric values corresponding to task or response times. |
... |
(Optional) If |
.alpha |
(Optional) A positive number (where 0 < |
.var |
If |
time_stats()
returns several point estimates, including means, geometric means (better when sample size <= 25), and medians (better for larger sample sizes). It also returns confidence interval information based on log-transformed values (for small samples) or raw (untransformed) data (for larger samples).
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 one or more means, confidence interval information, and other information.
Other descriptive stats for UX measures:
problem_stats()
,
ratings_stats()
,
success_stats()
1 2 3 4 5 6 7 8 9 10 11 | time_stats(c(40, 36, 53, 56, 110, 48, 34, 44, 30, 40, 80))
.ux_data <-
data.frame(
"id" = rep(seq(1,10,1),2),
"group" = rep(c("A","B"),10),
"task" = c(rep(1,10),rep(2,10)),
"time" = runif(20,200,1000)
)
time_stats(.ux_data, .var=time, task, .alpha = 0.001)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.