Colleagues,

I am trying to write a script for the Mantel Haenszel test.

For the MH test, the test statistic is chi-square (MH) = (W-1) * r^2 
Where W = sum of the case weights. This is straight forward.

I'm having difficulty with r^2. The r^2 is the squared Pearson correlation
between row and column variables.

Can anyone give me an example of the code which calculates the squared
Pearson correlation
between row and column variables? 

I am at a loss on how to do this.

All the best,

Thomas Subia

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to