any2any: any2any In ManyLabsOpenScience/manylabRs: Analysis scripts and data from the Many Labs projects

Description

Converts most common test statistics into most common (signed) effect sizes.

Converts most common test statistics into most common (signed) effect sizes.

Usage

 ``` 1 2 3 4 5 6 7 8 9 10 11``` ```any2any(testInfo, df1 = NULL, df2 = NULL, N = NULL, n1 = NULL, n2 = NULL, esType = NA, var.lor = NA, CIcalc = TRUE, CL = 0.95, rID = 0, q = 1, alternative = "two", keepDirection = TRUE, keepSign = TRUE, keepSignNames = c("r", "l.r", "u.r", "fisher.z", "l.z", "u.z")) any2any(testInfo, df1 = NULL, df2 = NULL, N = NULL, n1 = NULL, n2 = NULL, esType = NA, var.lor = NA, CIcalc = TRUE, CL = 0.95, rID = 0, q = 1, alternative = "two", keepDirection = TRUE, keepSign = TRUE, keepSignNames = c("r", "l.r", "u.r", "fisher.z", "l.z", "u.z")) ```

Arguments

 `df1` Degrees of freedom `df2` NULL or degrees of freedom of the denominator for the f-distribution. `N` Number of data points used in calculation of test-statistic. `n1` Number of data points in sample 1. `n2` Number of data points in sample 2. `esType` Type of test statistic. One of: "t", "lm.t", "f", "lm.f", "r", "X2", "Z", "lm.Z" `CIcalc` If `TRUE` (default) the Confidence Interval for the test statistic in `x` will be calculated using the "Confidence limits for noncentral parameters" functions in package (e.g., for type - "t": conf.limits.nct). `CL` Confidence Limit (default: .95). `rID` Correlation among predictor values in a linear model. `q` Number of predictors in the model. `alternative` Alternative hypothesis (defult = "two"). `keepSign` Return effect size with sign of test statistic? (default = TRUE). `keepSignNames` Which effect sizes should keep the sign if `keepSign = TRUE`? Default is to keep the sign for: "r","l.r","u.r","fisher.z","l.z","u.z". `st` Value(s) of a test statistic. `st` Value(s) of a test statistic. `df1` Degrees of freedom `df2` NULL or degrees of freedom of the denominator for the f-distribution. `N` Number of data points used in calculation of test-statistic. `n1` Number of data points in sample 1. `n2` Number of data points in sample 2. `esType` Type of test statistic. One of: "t", "lm.t", "f", "lm.f", "r", "X2", "Z", "lm.Z" `CIcalc` If `TRUE` (default) the Confidence Interval for the test statistic in `x` will be calculated using the "Confidence limits for noncentral parameters" functions in package (e.g., for type - "t": conf.limits.nct). `CL` Confidence Limit (default: .95). `rID` Correlation among predictor values in a linear model. `q` Number of predictors in the model. `alternative` Alternative hypothesis (defult = "two"). `keepSign` Return effect size with sign of test statistic? (default = TRUE). `keepSignNames` Which effect sizes should keep the sign if `keepSign = TRUE`? Default is to keep the sign for: "r","l.r","u.r","fisher.z","l.z","u.z".

Details

The procedure to calculate a variety of effect sizes is as follows:

• If `CIcalc == FALSE`, `package::compute.es` will be used to convert the test statistic to a large number of effect size estimates. The confidence intervals around the effect size estimates will be based meta-analytic estimates of effect size variance (e.g., for type - "t": tes).

• If `CIcalc == TRUE`, `package::MBESS` will be used to calculate the confidence interval for the test statistic based on its noncentral distribution (e.g., for type - "t": conf.limits.nct). Subsequently the test statistic, as well as its lower and upper confidence limit will each be passed to `compute.es` seperately.

• If `keepSign == TRUE` the sign of the test statistic will be copied to all the effect sizes in `keepSignNames`.

The procedure to calculate a variety of effect sizes is as follows:

• If `CIcalc == FALSE`, `package::compute.es` will be used to convert the test statistic to a large number of effect size estimates. The confidence intervals around the effect size estimates will be based meta-analytic estimates of effect size variance (e.g., for type - "t": tes).

• If `CIcalc == TRUE`, `package::MBESS` will be used to calculate the confidence interval for the test statistic based on its noncentral distribution (e.g., for type - "t": conf.limits.nct). Subsequently the test statistic, as well as its lower and upper confidence limit will each be passed to `compute.es` seperately.

• If `keepSign == TRUE` the sign of the test statistic will be copied to all the effect sizes in `keepSignNames`.

Value

The effect sizes calculated by `compute.es` corresponding to the test statistic(s), with either meta-analytic, or, exact CI.

The effect sizes calculated by `compute.es` corresponding to the test statistic(s), with either meta-analytic, or, exact CI.

Note

The prefix "lm" is currently disregarded, but will be implemented in future versions to indicate the test statistic is in fact a fixed factor in a linear model.

The prefix "lm" is currently disregarded, but will be implemented in future versions to indicate the test statistic is in fact a fixed factor in a linear model.

Author(s)

Fred Hasselman (inspired by RP:P function `any2r` by CHJ Hartgerink)

Fred Hasselman (inspired by RP:P function `any2r` by CHJ Hartgerink)

ManyLabsOpenScience/manylabRs documentation built on April 12, 2018, 8:22 p.m.