Title: | Calculates Probability of Superiority |
---|---|
Description: | The A() function calculates the A statistic, a nonparametric measure of effect size for two independent groups that’s also known as the probability of superiority (Ruscio, 2008), along with its standard error and a confidence interval constructed using bootstrap methods (Ruscio & Mullen, 2012). Optional arguments can be specified to calculate variants of the A statistic developed for other research designs (e.g., related samples, more than two independent groups or related samples; Ruscio & Gera, 2013). <DOI: 10.1037/1082-989X.13.1.19>. <DOI: 10.1080/00273171.2012.658329>. <DOI: 10.1080/00273171.2012.738184>. |
Authors: | John Ruscio |
Maintainer: | John Ruscio <[email protected]> |
License: | MIT + file LICENSE |
Version: | 3.0 |
Built: | 2024-12-17 06:34:09 UTC |
Source: | CRAN |
Calculates probability of superiority (A), its standard error, and a confidence interval.
A(data, design = 1, statistic = 1, weights = FALSE, w = 0, w1 = 0, w2 = 0, increase = FALSE, ref = 1, r = 0, n.bootstrap = 1999, conf.level = .95, ci.method = 1, seed = 1)
A(data, design = 1, statistic = 1, weights = FALSE, w = 0, w1 = 0, w2 = 0, increase = FALSE, ref = 1, r = 0, n.bootstrap = 1999, conf.level = .95, ci.method = 1, seed = 1)
data |
For a between subjects design, a matrix of cases (rows) by scores (column 1) and group codes (column 2). For a within subjects design, a matrix of scores with each sample in its own column (matrix). |
design |
Design of experiment (scalar, default = 1 (for between subjects design), user can also call 2 (for within subjects design)). |
statistic |
Statistic to be calculated (scalar, default = 1 (A), user can also call 2 (A.AAD), 3 (A.AAPD), 4 (A.IK), or 5 (A.Ord)). |
weights |
Whether to assign weights to cases (default = FALSE); if set to TRUE, data contains case weights in final column. |
w |
Weights for cases (vector; default = 0). |
w1 |
Weights for cases in group 1 (vector; default = 0). |
w2 |
Weights for cases in group 2 (vector; default = 0). |
increase |
Set to TRUE if scores are predicted to increase with group codes (default = FALSE). |
ref |
Reference group (to compare to all others) (scalar, default = 1). |
r |
Vector of proportions (vector, default = 0, represents equal proportions). |
n.bootstrap |
Number of bootstrap samples (scalar, default = 1999). |
conf.level |
Confidence level (default = .95). |
ci.method |
Method used to construct confidence interval (scalar, default = 1 (for BCA), user can also call 2 (for percentile)). |
seed |
Random number seed (scalar, default = 1). |
Returns list object with the following elements: A : A statistic (scalar). SE : Standard error of A (scalar). ci.lower : Lower bound of confidence interval (scalar). ci.upper : Upper bound of confidence interval (scalar). conf.level : Confidence level (scalar). n.bootstrap : Number of bootstrap samples (scalar). boot.method : Bootstrap method ("BCA" or "percentile"). n : Sample size (after missing data removed; scalar). n.missing : Number of cases of missing data, removed listewise (scalar).
John Ruscio
Ruscio (2008) & Ruscio and Mullen (2012) & Ruscio and Gera (2013)
x1 <- rnorm(25) x2 <- x1 - rnorm(25, mean = 1) x3 <- x2 - rnorm(25, mean = 1) data <- cbind(c(x1, x2, x3), c(rep(1, 25), rep(2, 25), rep(3, 25))) A(data, 1, 2)
x1 <- rnorm(25) x2 <- x1 - rnorm(25, mean = 1) x3 <- x2 - rnorm(25, mean = 1) data <- cbind(c(x1, x2, x3), c(rep(1, 25), rep(2, 25), rep(3, 25))) A(data, 1, 2)
Calculates the standard error and constructs a confidence interval for the A statistic using bootstrap methods.
A1(y1, y2, weights = FALSE, w1 = 0, w2 = 0, n.bootstrap = 1999, conf.level = .95, ci.method = 1, seed = 1)
A1(y1, y2, weights = FALSE, w1 = 0, w2 = 0, n.bootstrap = 1999, conf.level = .95, ci.method = 1, seed = 1)
y1 |
Scores for group 1 (vector). |
y2 |
Scores for group 2 (vector). |
weights |
Whether to weight cases (default = FALSE). |
w1 |
Weights for cases in group 1 (optional) (vector, default is 0). |
w2 |
Weights for cases in group 2 (optional) (vector, default is 0). |
n.bootstrap |
Number of bootstrap samples (scalar, default = 1999). |
conf.level |
Confidence level (scalar, default = .95). |
ci.method |
Method used to construct confidence interval (scalar, default = 1 (for BCA), user can also call 2 (for percentile). |
seed |
Random number seed (scalar, default = 1). |
A vector containing the A statistic, its estimated standard error, and the upper and lower bounds of the confidence interval.
John Ruscio
Ruscio (2008) & Ruscio and Mullen (2012) & Ruscio and Gera (2013)
#Example used in Ruscio and Mullen (2012) y1 <- c(6, 7, 8, 7, 9, 6, 5, 4, 7, 8, 7, 6, 9, 5, 4) y2 <- c(4, 3, 5, 3, 6, 2, 2, 1, 6, 7, 4, 3, 2, 4, 3) A1(y1, y2)
#Example used in Ruscio and Mullen (2012) y1 <- c(6, 7, 8, 7, 9, 6, 5, 4, 7, 8, 7, 6, 9, 5, 4) y2 <- c(4, 3, 5, 3, 6, 2, 2, 1, 6, 7, 4, 3, 2, 4, 3) A1(y1, y2)
Calculates the standard error and constructs a confidence interval for the A statistic for two correlated samples using bootstrap methods.
A2(y1, y2, weights = FALSE, w = 0, n.bootstrap = 1999, conf.level = .95, ci.method = 1, seed = 1)
A2(y1, y2, weights = FALSE, w = 0, n.bootstrap = 1999, conf.level = .95, ci.method = 1, seed = 1)
y1 |
Scores for group 1 (vector). |
y2 |
Scores for group 2 (vector). |
weights |
Whether to weight cases (default = FALSE). |
w |
Weights for cases in group 1 (optional) (vector, default is 0). |
n.bootstrap |
Number of bootstrap samples (scalar, default = 1999). |
conf.level |
Confidence level (scalar, default = .95). |
ci.method |
Method used to construct confidence interval (scalar, default = 1 (for BCA), user can also call 2 (for percentile). |
seed |
Random number seed (scalar, default = 1). |
A vector containing the A statistic, its estimated standard error, and the upper and lower bounds of the confidence interval.
John Ruscio
Ruscio (2008) & Ruscio and Mullen (2012) & Ruscio and Gera (2013)
y1 <- c(6, 7, 8, 7, 9, 6, 5, 4, 7, 8, 7, 6, 9, 5, 4) y2 <- c(7, 5, 6, 7, 6, 4, 3, 5, 4, 5, 4, 5, 7, 4, 5) A2(y1, y2)
y1 <- c(6, 7, 8, 7, 9, 6, 5, 4, 7, 8, 7, 6, 9, 5, 4) y2 <- c(7, 5, 6, 7, 6, 4, 3, 5, 4, 5, 4, 5, 7, 4, 5) A2(y1, y2)
Calculates the confidence interval for the A statistic for the average absolute deviation for two or more groups.
AAD1(y, r = 0, weights = FALSE, n.bootstrap = 1999, conf.level = .95, ci.method = 1, seed = 1)
AAD1(y, r = 0, weights = FALSE, n.bootstrap = 1999, conf.level = .95, ci.method = 1, seed = 1)
y |
Matrix of cases (rows) by scores (column 1) and group codes (column 2) (matrix). |
r |
Vector of proportions (default = 0, represents equal proportions) (vector). |
weights |
Weight of each case. Set to TRUE to weight cases; if so, column 3 contains case weights (default = FALSE). |
n.bootstrap |
Number of bootstrap samples (scalar, default = 1999). |
conf.level |
Confidence level (scalar, default = .95). |
ci.method |
Method used to construct confidence interval (scalar, default = 1 (for BCA), user can also call 2 (for percentile). |
seed |
Random number seed (scalar, default = 1). |
A vector containing the A statistic, its estimated standard error, and the upper and lower bounds of the confidence interval.
John Ruscio
Ruscio (2008) & Ruscio and Mullen (2012) & Ruscio and Gera (2013)
x1 <- rnorm(25) x2 <- x1 - rnorm(25, mean = 1) x3 <- x2 - rnorm(25, mean = 1) y <- cbind(c(x1, x2, x3), c(rep(1, 25), rep(2, 25), rep(3, 25))) AAD1(y)
x1 <- rnorm(25) x2 <- x1 - rnorm(25, mean = 1) x3 <- x2 - rnorm(25, mean = 1) y <- cbind(c(x1, x2, x3), c(rep(1, 25), rep(2, 25), rep(3, 25))) AAD1(y)
Calculates the confidence interval for the A statistic for the average absolute deviation for two or more correlated samples.
AAD2(y, r = 0, weights = FALSE, n.bootstrap = 1999, conf.level = .95, ci.method = 1, seed = 1)
AAD2(y, r = 0, weights = FALSE, n.bootstrap = 1999, conf.level = .95, ci.method = 1, seed = 1)
y |
Matrix of cases (rows) by scores (column 1) and group codes (column 2) (matrix). |
r |
Vector of proportions (default = 0, represents equal proportions) (vector). |
weights |
Weight of each case. Set to TRUE to weight cases; if so, column 3 contains case weights (default = FALSE). |
n.bootstrap |
Number of bootstrap samples (scalar, default = 1999). |
conf.level |
Confidence level (scalar, default = .95). |
ci.method |
Method used to construct confidence interval (scalar, default = 1 (for BCA), user can also call 2 (for percentile). |
seed |
Random number seed (scalar, default = 1). |
A vector containing the A statistic, its estimated standard error, and the upper and lower bounds of the confidence interval.
John Ruscio
Ruscio (2008) & Ruscio and Mullen (2012) & Ruscio and Gera (2013)
x1 <- rnorm(25) x2 <- x1 - rnorm(25, mean = 1) x3 <- x2 - rnorm(25, mean = 1) y <- cbind(x1, x2, x3) AAD2(y)
x1 <- rnorm(25) x2 <- x1 - rnorm(25, mean = 1) x3 <- x2 - rnorm(25, mean = 1) y <- cbind(x1, x2, x3) AAD2(y)
Calculates the confidence interval for the A statistic for the average absolute paired deviation for two or more groups.
AAPD1(y, weights = FALSE, n.bootstrap = 1999, conf.level = .95, ci.method = 1, seed = 1)
AAPD1(y, weights = FALSE, n.bootstrap = 1999, conf.level = .95, ci.method = 1, seed = 1)
y |
Matrix of cases (rows) by scores (column 1) and group codes (column 2) (matrix). |
weights |
Weight of each case. Set to TRUE to weight cases; if so, column 3 contains case weights (default = FALSE). |
n.bootstrap |
Number of bootstrap samples (scalar, default = 1999). |
conf.level |
Confidence level (scalar, default = .95). |
ci.method |
Method used to construct confidence interval (scalar, default = 1 (for BCA), user can also call 2 (for percentile). |
seed |
Random number seed (scalar, default = 1). |
A vector containing the A statistic, its estimated standard error, and the upper and lower bounds of the confidence interval.
John Ruscio
Ruscio (2008) & Ruscio and Mullen (2012) & Ruscio and Gera (2013)
x1 <- rnorm(25) x2 <- x1 - rnorm(25, mean = 1) x3 <- x2 - rnorm(25, mean = 1) y <- cbind(c(x1, x2, x3), c(rep(1, 25), rep(2, 25), rep(3, 25))) AAPD1(y)
x1 <- rnorm(25) x2 <- x1 - rnorm(25, mean = 1) x3 <- x2 - rnorm(25, mean = 1) y <- cbind(c(x1, x2, x3), c(rep(1, 25), rep(2, 25), rep(3, 25))) AAPD1(y)
Calculates the confidence interval for the A statistic for the average absolute paired deviation for two or more correlated samples.
AAPD2(y, weights = FALSE, n.bootstrap = 1999, conf.level = .95, ci.method = 1, seed = 1)
AAPD2(y, weights = FALSE, n.bootstrap = 1999, conf.level = .95, ci.method = 1, seed = 1)
y |
Matrix of cases (rows) by scores (column 1) and group codes (column 2) (matrix). |
weights |
Weight of each case. Set to TRUE to weight cases; if so, column 3 contains case weights (default = FALSE). |
n.bootstrap |
Number of bootstrap samples (scalar, default = 1999). |
conf.level |
Confidence level (scalar, default = .95). |
ci.method |
Method used to construct confidence interval (scalar, default = 1 (for BCA), user can also call 2 (for percentile). |
seed |
Random number seed (scalar, default = 1). |
A vector containing the A statistic, its estimated standard error, and the upper and lower bounds of the confidence interval.
John Ruscio
Ruscio (2008) & Ruscio and Mullen (2012) & Ruscio and Gera (2013)
x1 <- rnorm(25) x2 <- x1 - rnorm(25, mean = 1) x3 <- x2 - rnorm(25, mean = 1) y <- cbind(x1, x2, x3) AAPD2(y)
x1 <- rnorm(25) x2 <- x1 - rnorm(25, mean = 1) x3 <- x2 - rnorm(25, mean = 1) y <- cbind(x1, x2, x3) AAPD2(y)
Calculates the A statistic for 2 groups.
CalcA1(y1, y2, weights = FALSE, w1 = 0, w2 = 0)
CalcA1(y1, y2, weights = FALSE, w1 = 0, w2 = 0)
y1 |
Scores for group 1 (vector). |
y2 |
Scores for group 2 (vector). |
weights |
Whether to weight cases (default = FALSE). |
w1 |
Weights for cases in group 1 (optional) (vector, default is 0). |
w2 |
Weights for cases in group 2 (optional) (vector, default is 0). |
a |
The A statistic. |
John Ruscio
Ruscio (2008) & Ruscio and Mullen (2012) & Ruscio and Gera (2013)
#Example used in Ruscio and Mullen (2012) y1 <- c(6, 7, 8, 7, 9, 6, 5, 4, 7, 8, 7, 6, 9, 5, 4) y2 <- c(4, 3, 5, 3, 6, 2, 2, 1, 6, 7, 4, 3, 2, 4, 3) CalcA1(y1, y2)
#Example used in Ruscio and Mullen (2012) y1 <- c(6, 7, 8, 7, 9, 6, 5, 4, 7, 8, 7, 6, 9, 5, 4) y2 <- c(4, 3, 5, 3, 6, 2, 2, 1, 6, 7, 4, 3, 2, 4, 3) CalcA1(y1, y2)
Calculates the A statistic for 2 correlated samples.
CalcA2(y1, y2, weights = FALSE, w = 0)
CalcA2(y1, y2, weights = FALSE, w = 0)
y1 |
Scores for variable 1 (vector). |
y2 |
Scores for variable 2 (vector). |
weights |
Whether to weight cases (default = FALSE). |
w |
Weights (optional) (vector, default is 0). |
a |
The A statistic. |
John Ruscio
Ruscio (2008) & Ruscio and Mullen (2012) & Ruscio and Gera (2013)
y1 <- c(6, 7, 8, 7, 9, 6, 5, 4, 7, 8, 7, 6, 9, 5, 4) y2 <- c(7, 5, 6, 7, 6, 4, 3, 5, 4, 5, 4, 5, 7, 4, 5) CalcA2(y1, y2)
y1 <- c(6, 7, 8, 7, 9, 6, 5, 4, 7, 8, 7, 6, 9, 5, 4) y2 <- c(7, 5, 6, 7, 6, 4, 3, 5, 4, 5, 4, 5, 7, 4, 5) CalcA2(y1, y2)
Calculates the A statistic for the average absolute deviation for two or more groups. Note: This function is not meant to be called by the user, but it is called by AAD1.
CalcAAD1(y, r = 0, weights = FALSE)
CalcAAD1(y, r = 0, weights = FALSE)
y |
Matrix of cases (rows) by scores (column 1) and group codes (column 2) (matrix). |
r |
Vector of proportions (default = 0, represents equal proportions) (vector). |
weights |
Weight of each case. Set to TRUE to weight cases; if so, column 3 contains case weights (default = FALSE). |
a |
The A statistic. |
John Ruscio
Ruscio (2008) & Ruscio and Mullen (2012) & Ruscio and Gera (2013)
x1 <- rnorm(25) x2 <- x1 - rnorm(25, mean = 1) x3 <- x2 - rnorm(25, mean = 1) y <- cbind(c(x1, x2, x3), c(rep(1, 25), rep(2, 25), rep(3, 25))) CalcAAD1(y)
x1 <- rnorm(25) x2 <- x1 - rnorm(25, mean = 1) x3 <- x2 - rnorm(25, mean = 1) y <- cbind(c(x1, x2, x3), c(rep(1, 25), rep(2, 25), rep(3, 25))) CalcAAD1(y)
Calculates the A statistic for the average absolute deviation for two or more correlated samples. Note: This function is not meant to be called by the user, but it is called by AAD2.
CalcAAD2(y, r = 0, weights = FALSE)
CalcAAD2(y, r = 0, weights = FALSE)
y |
Matrix of cases (rows) by scores (column 1) and group codes (column 2) (matrix). |
r |
Vector of proportions (default = 0, represents equal proportions) (vector). |
weights |
Weight of each case. Set to TRUE to weight cases; if so, column 3 contains case weights (default = FALSE). |
a |
The A statistic. |
John Ruscio
Ruscio (2008) & Ruscio and Mullen (2012) & Ruscio and Gera (2013)
x1 <- rnorm(25) x2 <- x1 - rnorm(25, mean = 1) x3 <- x2 - rnorm(25, mean = 1) y <- cbind(x1, x2, x3) CalcAAD2(y)
x1 <- rnorm(25) x2 <- x1 - rnorm(25, mean = 1) x3 <- x2 - rnorm(25, mean = 1) y <- cbind(x1, x2, x3) CalcAAD2(y)
Calculates the A statistic for the average absolute paired deviation for two or more groups. Note: This function is not meant to be called by the user, but it is called by AAPD1.
CalcAAPD1(y, weights = FALSE)
CalcAAPD1(y, weights = FALSE)
y |
Matrix of cases (rows) by scores (column 1) and group codes (column 2) (matrix). |
weights |
Weight of each case. Set to TRUE to weight cases; if so, column 3 contains case weights (default = FALSE). |
a |
The A statistic. |
John Ruscio
Ruscio (2008) & Ruscio and Mullen (2012) & Ruscio and Gera (2013)
x1 <- rnorm(25) x2 <- x1 - rnorm(25, mean = 1) x3 <- x2 - rnorm(25, mean = 1) y <- cbind(c(x1, x2, x3), c(rep(1, 25), rep(2, 25), rep(3, 25))) AAPD1(y)
x1 <- rnorm(25) x2 <- x1 - rnorm(25, mean = 1) x3 <- x2 - rnorm(25, mean = 1) y <- cbind(c(x1, x2, x3), c(rep(1, 25), rep(2, 25), rep(3, 25))) AAPD1(y)
Calculates the A statistic for the average absolute paired deviation for two or more correlated samples. Note: This function is not meant to be called by the user, but it is called by AAPD2.
CalcAAPD2(y, weights = FALSE)
CalcAAPD2(y, weights = FALSE)
y |
Matrix of cases (rows) by scores (column 1) and group codes (column 2) (matrix). |
weights |
Weight of each case. Set to TRUE to weight cases; if so, column 3 contains case weights (default = FALSE). |
a |
The A statistic. |
John Ruscio
Ruscio (2008) & Ruscio and Mullen (2012) & Ruscio and Gera (2013)
x1 <- rnorm(25) x2 <- x1 - rnorm(25, mean = 1) x3 <- x2 - rnorm(25, mean = 1) y <- cbind(x1, x2, x3) AAPD2(y)
x1 <- rnorm(25) x2 <- x1 - rnorm(25, mean = 1) x3 <- x2 - rnorm(25, mean = 1) y <- cbind(x1, x2, x3) AAPD2(y)
Calculates the A statistic while singling out one group for two or more groups. Note: This function is not meant to be called by the user, but it is called by IK1.
CalcIK1(y, ref = 1, weights = FALSE)
CalcIK1(y, ref = 1, weights = FALSE)
y |
Matrix of cases (rows) by scores (column 1) and group codes (column 2) (matrix). |
ref |
Reference group (to compare to all others) (scalar, default = 1). |
weights |
Weight of each case. Set to TRUE to weight cases; if so, column 3 contains case weights (default = FALSE). |
a |
The A statistic. |
John Ruscio
Ruscio (2008) & Ruscio and Mullen (2012) & Ruscio and Gera (2013)
x1 <- rnorm(25) x2 <- x1 - rnorm(25, mean = 1) x3 <- x2 - rnorm(25, mean = 1) y <- cbind(c(x1, x2, x3), c(rep(1, 25), rep(2, 25), rep(3, 25))) CalcIK1(y)
x1 <- rnorm(25) x2 <- x1 - rnorm(25, mean = 1) x3 <- x2 - rnorm(25, mean = 1) y <- cbind(c(x1, x2, x3), c(rep(1, 25), rep(2, 25), rep(3, 25))) CalcIK1(y)
Calculates the A statistic while singling out one group for two or more correlated samples. Note: This function is not meant to be called by the user, but it is called by IK2.
CalcIK2(y, ref = 1, weights = FALSE)
CalcIK2(y, ref = 1, weights = FALSE)
y |
Matrix of cases (rows) by scores (column 1) and group codes (column 2) (matrix). |
ref |
Reference group (to compare to all others) (scalar, default = 1). |
weights |
Weight of each case. Set to TRUE to weight cases; if so, column 3 contains case weights (default = FALSE). |
a |
The A statistic. |
John Ruscio
Ruscio (2008) & Ruscio and Mullen (2012) & Ruscio and Gera (2013)
x1 <- rnorm(25) x2 <- x1 - rnorm(25, mean = 1) x3 <- x2 - rnorm(25, mean = 1) y <- cbind(x1, x2, x3) CalcIK2(y)
x1 <- rnorm(25) x2 <- x1 - rnorm(25, mean = 1) x3 <- x2 - rnorm(25, mean = 1) y <- cbind(x1, x2, x3) CalcIK2(y)
Calculates the ordinal comparison of the A statistic for two or more groups. Note: This function is not meant to be called by the user, but it is called by AOrd1.
CalcOrd1(y, weights = FALSE, increase = FALSE)
CalcOrd1(y, weights = FALSE, increase = FALSE)
y |
Matrix of cases (rows) by scores (column 1) and group codes (column 2) (matrix). |
weights |
Weight of each case. Set to TRUE to weight cases; if so, column 3 contains case weights (default = FALSE). |
increase |
Set to TRUE if scores are predicted to increase with group codes (default = FALSE). |
a |
The A statistic. |
John Ruscio
Ruscio (2008) & Ruscio and Mullen (2012) & Ruscio and Gera (2013)
x1 <- rnorm(25) x2 <- x1 - rnorm(25, mean = 1) x3 <- x2 - rnorm(25, mean = 1) y <- cbind(c(x1, x2, x3), c(rep(1, 25), rep(2, 25), rep(3, 25))) CalcOrd1(y)
x1 <- rnorm(25) x2 <- x1 - rnorm(25, mean = 1) x3 <- x2 - rnorm(25, mean = 1) y <- cbind(c(x1, x2, x3), c(rep(1, 25), rep(2, 25), rep(3, 25))) CalcOrd1(y)
Calculates the ordinal comparison of the A statistic for two or more correlated samples. Note: This function is not meant to be called by the user, but it is called by AOrd2.
CalcOrd2(y, weights = FALSE, increase = FALSE)
CalcOrd2(y, weights = FALSE, increase = FALSE)
y |
Matrix of cases (rows) by scores (column 1) and group codes (column 2) (matrix). |
weights |
Weight of each case. Set to TRUE to weight cases; if so, column 3 contains case weights (default = FALSE). |
increase |
Set to TRUE if scores are predicted to increase with group codes (default = FALSE). |
a |
The A statistic. |
John Ruscio
Ruscio (2008) & Ruscio and Mullen (2012) & Ruscio and Gera (2013)
x1 <- rnorm(25) x2 <- x1 - rnorm(25, mean = 1) x3 <- x2 - rnorm(25, mean = 1) y <- cbind(x1, x2, x3) CalcOrd2(y)
x1 <- rnorm(25) x2 <- x1 - rnorm(25, mean = 1) x3 <- x2 - rnorm(25, mean = 1) y <- cbind(x1, x2, x3) CalcOrd2(y)
Calculates the confidence interval for the A statistic while singling out one group for two or more groups.
IK1(y, ref = 1, weights = FALSE, n.bootstrap = 1999, conf.level = .95, ci.method = 1, seed = 1)
IK1(y, ref = 1, weights = FALSE, n.bootstrap = 1999, conf.level = .95, ci.method = 1, seed = 1)
y |
Matrix of cases (rows) by scores (column 1) and group codes (column 2) (matrix). |
ref |
Reference group (to compare to all others) (scalar, default = 1). |
weights |
Weight of each case. Set to TRUE to weight cases; if so, column 3 contains case weights (default = FALSE). |
n.bootstrap |
Number of bootstrap samples (scalar, default = 1999). |
conf.level |
Confidence level (scalar, default = .95). |
ci.method |
Method used to construct confidence interval (scalar, default = 1 (for BCA), user can also call 2 (for percentile). |
seed |
Random number seed (scalar, default = 1). |
A vector containing the A statistic, its estimated standard error, and the upper and lower bounds of the confidence interval.
John Ruscio
Ruscio (2008) & Ruscio and Mullen (2012) & Ruscio and Gera (2013)
x1 <- rnorm(25) x2 <- x1 - rnorm(25, mean = 1) x3 <- x2 - rnorm(25, mean = 1) y <- cbind(c(x1, x2, x3), c(rep(1, 25), rep(2, 25), rep(3, 25))) IK1(y)
x1 <- rnorm(25) x2 <- x1 - rnorm(25, mean = 1) x3 <- x2 - rnorm(25, mean = 1) y <- cbind(c(x1, x2, x3), c(rep(1, 25), rep(2, 25), rep(3, 25))) IK1(y)
Calculates the confidence interval for the A statistic while singling out one group for two or more correlated samples.
IK2(y, ref = 1, weights = FALSE, n.bootstrap = 1999, conf.level = .95, ci.method = 1, seed = 1)
IK2(y, ref = 1, weights = FALSE, n.bootstrap = 1999, conf.level = .95, ci.method = 1, seed = 1)
y |
Matrix of cases (rows) by scores (column 1) and group codes (column 2) (matrix). |
ref |
Reference group (to compare to all others) (scalar, default = 1). |
weights |
Weight of each case. Set to TRUE to weight cases; if so, column 3 contains case weights (default = FALSE). |
n.bootstrap |
Number of bootstrap samples (scalar, default = 1999). |
conf.level |
Confidence level (scalar, default = .95). |
ci.method |
Method used to construct confidence interval (scalar, default = 1 (for BCA), user can also call 2 (for percentile). |
seed |
Random number seed (scalar, default = 1). |
A vector containing the A statistic, its estimated standard error, and the upper and lower bounds of the confidence interval.
John Ruscio
Ruscio (2008) & Ruscio and Mullen (2012) & Ruscio and Gera (2013)
x1 <- rnorm(25) x2 <- x1 - rnorm(25, mean = 1) x3 <- x2 - rnorm(25, mean = 1) y <- cbind(x1, x2, x3) IK2(y)
x1 <- rnorm(25) x2 <- x1 - rnorm(25, mean = 1) x3 <- x2 - rnorm(25, mean = 1) y <- cbind(x1, x2, x3) IK2(y)
Calculates the confidence interval for the ordinal comparison of the A statistic for two or more groups.
Ord1(y, weights = FALSE, increase = FALSE, n.bootstrap = 1999, conf.level = .95, ci.method = 1, seed = 1)
Ord1(y, weights = FALSE, increase = FALSE, n.bootstrap = 1999, conf.level = .95, ci.method = 1, seed = 1)
y |
Matrix of cases (rows) by scores (column 1) and group codes (column 2) (matrix). |
weights |
Weight of each case. Set to TRUE to weight cases; if so, column 3 contains case weights (default = FALSE). |
increase |
Set to TRUE if scores are predicted to increase with group codes (default = FALSE). |
n.bootstrap |
Number of bootstrap samples (scalar, default = 1999). |
conf.level |
Confidence level (scalar, default = .95). |
ci.method |
Method used to construct confidence interval (scalar, default = 1 (for BCA), user can also call 2 (for percentile). |
seed |
Random number seed (scalar, default = 1). |
A vector containing the A statistic, its estimated standard error, and the upper and lower bounds of the confidence interval.
John Ruscio
Ruscio (2008) & Ruscio and Mullen (2012) & Ruscio and Gera (2013)
x1 <- rnorm(25) x2 <- x1 - rnorm(25, mean = 1) x3 <- x2 - rnorm(25, mean = 1) y <- cbind(c(x1, x2, x3), c(rep(1, 25), rep(2, 25), rep(3, 25))) Ord1(y)
x1 <- rnorm(25) x2 <- x1 - rnorm(25, mean = 1) x3 <- x2 - rnorm(25, mean = 1) y <- cbind(c(x1, x2, x3), c(rep(1, 25), rep(2, 25), rep(3, 25))) Ord1(y)
Calculates the confidence interval for the ordinal comparison of the A statistic for two or more correlated samples.
Ord2(y, weights = FALSE, increase = FALSE, n.bootstrap = 1999, conf.level = .95, ci.method = 1, seed = 1)
Ord2(y, weights = FALSE, increase = FALSE, n.bootstrap = 1999, conf.level = .95, ci.method = 1, seed = 1)
y |
Matrix of cases (rows) by scores (column 1) and group codes (column 2) (matrix). |
weights |
Weight of each case. Set to TRUE to weight cases; if so, column 3 contains case weights (default = FALSE). |
increase |
Set to TRUE if scores are predicted to increase with group codes (default = FALSE). |
n.bootstrap |
Number of bootstrap samples (scalar, default = 1999). |
conf.level |
Confidence level (scalar, default = .95). |
ci.method |
Method used to construct confidence interval (scalar, default = 1 (for BCA), user can also call 2 (for percentile). |
seed |
Random number seed (scalar, default = 1). |
A vector containing the A statistic, its estimated standard error, and the upper and lower bounds of the confidence interval.
John Ruscio
Ruscio (2008) & Ruscio and Mullen (2012) & Ruscio and Gera (2013)
x1 <- rnorm(25) x2 <- x1 - rnorm(25, mean = 1) x3 <- x2 - rnorm(25, mean = 1) y <- cbind(x1, x2, x3) Ord2(y)
x1 <- rnorm(25) x2 <- x1 - rnorm(25, mean = 1) x3 <- x2 - rnorm(25, mean = 1) y <- cbind(x1, x2, x3) Ord2(y)
Checks for missing data and performs listwise deletion if any is detected.
RemoveMissing(data)
RemoveMissing(data)
data |
For a between subjects design, a matrix of cases (rows) by scores (column 1) and group codes (column 2). For a within subjects design, a matrix of scores with each sample in its own column (matrix). |
Data matrix with any missing data removed using listwise deletion of cases.
John Ruscio
Ruscio (2008) & Ruscio and Mullen (2012) & Ruscio and Gera (2013)
x1 <- c(rnorm(25), NA) x2 <- x1 - rnorm(26, mean = 1) x3 <- x2 - rnorm(26, mean = 1) data <- cbind(c(x1, x2, x3), c(rep(1, 26), rep(2, 26), rep(3, 26))) A(data, 1, 2)
x1 <- c(rnorm(25), NA) x2 <- x1 - rnorm(26, mean = 1) x3 <- x2 - rnorm(26, mean = 1) data <- cbind(c(x1, x2, x3), c(rep(1, 26), rep(2, 26), rep(3, 26))) A(data, 1, 2)