Compare word and character counts across conditions. I'd inspect a condition that consistently produces longer texts: respondents may be reacting to the extra information as well as the intended manipulation.
Value
A list with by_condition, grand_mean_words,
max_deviation, n_missing, n_no_condition, and
pass.
Examples
check_length_balance(
c("Short text here.", "A somewhat longer text appears here now.", "Brief."),
c("treatment", "treatment", "control")
)
#> ! Length balance: max deviation 72.7% (> 20%)
#> $by_condition
#> # A tibble: 2 × 6
#> condition n mean_words sd_words mean_chars deviation
#> <chr> <int> <dbl> <dbl> <dbl> <dbl>
#> 1 control 1 1 NA 6 0.727
#> 2 treatment 2 5 2.83 28 0.364
#>
#> $grand_mean_words
#> [1] 3.666667
#>
#> $max_deviation
#> [1] 0.7272727
#>
#> $n_missing
#> [1] 0
#>
#> $n_no_condition
#> [1] 0
#>
#> $pass
#> [1] FALSE
#>
