This function calculates the probability of superiority from independent samples Cohen's d calculation.
probability_superiority(
d = NULL,
m1 = NULL,
m2 = NULL,
sd1 = NULL,
sd2 = NULL,
n1 = NULL,
n2 = NULL,
a = 0.05,
t = NULL,
model = NULL,
df = NULL,
x_col = NULL,
y_col = NULL
)The probability of superiority.
the effect size
mean group one
mean group two
standard deviation group one
standard deviation group two
sample size group one
sample size group two
significance level
optional, calculate d from independent t, you must include n1 and n2 for degrees of freedom
optional, calculate d from t.test for independent t, you must still include n1 and n2
optional dataframe that includes the x_col and y_col
name of the column that contains the factor levels OR a numeric vector of group 1 scores
name of the column that contains the dependent score OR a numeric vector of group 2 scores
You should provide one combination of the following:
1: d
2: m1 through n2
3: t, n1, n2
4: model, n1, n2
5: df, "x_col", "y_col"
6: x_col, y_col as numeric vectors
probability_superiority(d = .25)
Run the code above in your browser using DataLab