perfect_t_test: perfect_t_test

Description Usage Arguments Value Examples

View source: R/perfect_t_test.r

Description

Calculates a Welch's independent t-test, Cohen's d with 95

Usage

1
2
perfect_t_test(data, DV_name, IV_condition_a_name, IV_condition_b_name,
  IV_condition_a_code_in_data, IV_condition_b_code_in_data)

Arguments

data

dataframe to be analysed. Must contain columns named IV (two values: factor, string or integer) and DV (continuous).

DV_name

Number of decimal places to round to.

IV_condition_a_name

labelling of the IV condition A for the output (e.g., "the control condition").

IV_condition_b_name

labelling of the IV condition A for the output (e.g., "the experimental condition").

IV_condition_a_code_in_data

assignment of condition A in the IV column (e.g., 0).

IV_condition_b_code_in_data

assignment of condition A in the IV column (e.g., 1).

Value

Returns a long string of the output of the tests. E.g., "A Welch's independent t-test demonstrated significant differences of large effect size in self-report ratings between the positive source (N = 50, M = -0.16, SD = 0.92) and the negative source (N = 50, M = 0.79, SD = 0.99), t(97.49) = -4.99, p < .001, d = -1, 95

Examples

1
2
3
4
5
6
perfect_t_test(data                         = data,
               DV_name                      = "self-report ratings",
               IV_condition_a_name          = "the experimental condition",
               IV_condition_b_name          = "the control condition",
               IV_condition_a_code_in_data  = 1,
               IV_condition_b_code_in_data  = 0)

ianhussey/timesavers documentation built on May 18, 2019, 1:28 a.m.