Skip to contents

Compare Means Within Groups

Usage

compare_means_within_groups(
  data,
  var1,
  var2,
  input = "wide",
  output = "console"
)

Arguments

data

dataframe

var1

variable 1

var2

variable 2

input

Default: "long" - long form of data, "values" to pass values directly. If using this option, must specify mean, sd, and n.

output

Default: "console" - prints output in console and returns tibble invisibly.

Value

results

Examples

data <- data.frame(id = c(1:7),
  task1 = c(4, 1, 2, 3, 8, 4, 4),
  task2 = c(7, 13, 9, 7, 18, 8, 10))
compare_means_within_groups(data, task1, task2)
#> 
#> ── Compare Means Within Groups ─────────────────────────────────────────────────
#>   X.                result.estimate  
#>   mean.difference         -6.571429  
#>   t                           -5.18  
#>   p                           0.002  
#>   df                              6  
#>   ci_level                     0.95  
#>   lower_ci                    -9.68  
#>   upper_ci                    -3.46