Converts the robust effect size index (S) to Z statistic. Vector arguments are accepted. If different length arguments are passed they are dealt with in the usual way of R.
S2z(S, n, unbiased =TRUE)
Arguments
S: The value of the RESI estimate.
n: Number of independent samples.
unbiased: Logical, whether the unbiased or alternative estimator was used to compute RESI estimate. Default is TRUE.
Returns
Returns a scalar or vector argument of the Chi-square statistic.
Details
The formula for converting a RESI estimate to a corresponding Z statistic depends on which estimator was used to compute the RESI estimate (unbiased vs. alternative, see z2S). For the unbiased estimator, the RESI can be positive or negative and there is a 1-1 transformation from S to Z. The formula for converting S (unbiased) to the Z statistic is:
(n)∗S
For the alternative formula, if the RESI estimate is 0, the Z statistic is only known within an interval, [-1, 1]. For a non-zero S, the formula is:
S2/S(n∗abs(S)+1)
Examples
# convert S estimates with corresponding degrees of freedom to# Z statistics estimates (using unbiased formula)S_ests = c(-0.2,0,0.1)S2z(S = S_ests, n =300, unbiased =TRUE)# convert S estimates with corresponding degrees of freedom to# Z statistics estimates (using alernative formula)S_ests = c(-0.2,0,0.1)S2z(S = S_ests, n =300, unbiased =FALSE)