ratings_stats: Compute stats for ratings or continuously distributed data

Description Usage Arguments Details Value See Also Examples

View source: R/ratings_stats-function.R

Description

For ratings data and other continuously distributed variables, ratings_stats() returns means; information about confidence intervals (based on the T distribution); standard deviations; medians; and other details.

Usage

1
2
3
4
5
6
7
ratings_stats(.x, ...)

## S3 method for class 'numeric'
ratings_stats(.x, ..., .alpha = 0.05, .limits = NULL)

## S3 method for class 'data.frame'
ratings_stats(.x, .var, ..., .alpha = 0.05, .limits = NULL)

Arguments

.x

A vector of values, or a long-format data frame with a named column containing numeric ratings data.

...

(Optional) If .x is a long-format data frame, you can pass the name of one or more grouping variables as unquoted, comma-separated column names (without naming the ... argument) to compute stats by groups.

.alpha

(Optional) A positive number (where 0 < .alpha < 1) specifying the significance level to be used. Defaults to .alpha = 0.05. To set a different significance level, the argument must be named (i.e., .alpha=0.001) or else the function may yield unexpected results.

.limits

(Optional) If you want to specify the end-points (limits) for the ratings scale, which will ensure that confidence interval values don't exceed the upper and lower bounds, you can supply a numeric vector of length two,indicating the limits (e.g., .limits = c(1,7)).

.var

If .x is a data frame, the unquoted name of the data frame column containing the values to use in the computations.

Details

Note that NAs are automatically dropped in all calculations.

Value

A tibble with one or more means, confidence interval information, and other information.

See Also

Other descriptive stats for UX measures: problem_stats(), success_stats(), time_stats()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# Compare the difference between the output of:
ratings_stats(c(1,8,8)) # and:

ratings_stats(c(1,8,8), .limits = c(1,8))

.ux_data <-
 data.frame(
  "id" = rep(seq(1,10,1),2),
  "task" = c(rep(1,10),rep(2,10)),
  "easiness"  = sample(1:7,20,replace=TRUE))

ratings_stats(.ux_data, easiness,task,.alpha=0.01,.limits=c(1,7))

darrellpenta/uxstats documentation built on Jan. 18, 2022, 8:06 p.m.