Sunday, 10 February 2019

A Function for Meng's Test of the Heterogeneity of Correlated Correlation Coefficients

Here's a first draft of a simple function for the test of heterogeneity of correlated correlation coefficients in Meng, Rosenthal and Rubin (1992), which I blogged about way back when. There are no tests included (e.g. tests that input is numeric) and the code is undoubtedly a bit flabby, but it works perfectly well.

It's a potentially useful test for many, but doesn't appear to be provided in any of the mainstream statistical software. 

Importantly, the function works for any number of correlated correlation coefficients and also allows for contrast tests. 

As input, the function takes a vector of correlations, the median correlation between the variables, sample size, and contrast weights (if required).