Class CorrelationEffectMetaAnalysis


  • public class CorrelationEffectMetaAnalysis
    extends MetaAnalysis
    Implementation of meta-analysis of correlations along the lines of chapter 18 of Cooper and Hedges, "Handbook of Research Synthesis". Both fixed and random effects models are supported, with z-transformed or untransformed correlations.
    Author:
    pavlidis
    • Constructor Detail

      • CorrelationEffectMetaAnalysis

        public CorrelationEffectMetaAnalysis()
      • CorrelationEffectMetaAnalysis

        public CorrelationEffectMetaAnalysis​(boolean fixed,
                                             boolean transform)
    • Method Detail

      • samplingVariance

        protected static double samplingVariance​(double r,
                                                 double numsamples)
        Equation 18-10 from CH. For untransformed correlations.

         v_i = ( 1 - r_i ˆ 2 ) ˆ 2 / ( n_i - 1 )
         

        I added a regularization to this, so that we don't get ridiculous variances when correlations are close to 1 (this happens). If the correlation is very close to 1 (or -1), we fudge it to be a value less close to 1 (e.g., 0.999)

        Parameters:
        r -
        n -
        Returns:
      • getBsv

        public double getBsv()
      • getE

        public double getE()
      • getN

        public double getN()
      • getP

        public double getP()
      • getQ

        public double getQ()
      • getV

        public double getV()
      • getZ

        public double getZ()
      • run

        public double run​(cern.colt.list.DoubleArrayList effects,
                          cern.colt.list.DoubleArrayList sampleSizes)
        Following CH section 2.2.

        There are four possible cases (for now):

        1. Fixed effects, Z-transformed. Weights are computed using CH eqns 18-8 and 18-3
        2. Fixed effects, untransformed. Weights are computed using CH eqns 18-10 and 18-3
        3. Random effects, Z-transformed. Weights are computed using CH eqns 18-20, 18-8 with 18-3
        4. Random effects, untransformed. Weights are computed using CH eqns 18-10, 18-20, 18-24.
        The default is untransformed, fixed effects.
        Parameters:
        correlations - - NOT fisher transformed. This routine takes care of that.
        sampleSizes -
        Returns:
        p-value. The p-value is also stored in the field p.
      • setFixed

        public void setFixed​(boolean fixed)
      • setTransform

        public void setTransform​(boolean transform)
      • fisherTransformedSamplingVariance

        protected double fisherTransformedSamplingVariance​(double sampleSize)
        Equation 18-8 from CH. For z-transformed correlations.
         v_i = 1 / ( n_i - 3 )
         
        Parameters:
        n -
        Returns:
      • fisherTransformedSamplingVariances

        protected cern.colt.list.DoubleArrayList fisherTransformedSamplingVariances​(cern.colt.list.DoubleArrayList sampleSizes)
        Run equation CH 18-8 on a list of sample sizes.
        Parameters:
        sampleSizes -
        Returns:
      • samplingVariances

        protected cern.colt.list.DoubleArrayList samplingVariances​(cern.colt.list.DoubleArrayList effectSizes,
                                                                   cern.colt.list.DoubleArrayList sampleSizes)
        Run equation CH 18-10 on a list of sample sizes and effects.
        Parameters:
        effectSizes -
        sampleSizes -
        Returns:
        See Also:
        samplingVariance(double,double)