Computes \(P(X > val)\) where \(X = w_1 Y + w_2 Z\), where \(Y\) is chi square distributed with \(d_1\) degrees of freedom, \(Z\) is chi square distributed with \(d_2\) degrees of freedom, and \(w_1\) and \(w_2\) are weights with \(w_2\) assumed positive. The probability is computed using numerical integration of the densities of the two chi square distributions. (Method: trapezoidal rule)
weightedChi2P(val, w1, w2, d1, d2)
observed statistic
weight of first chi square rv
weight of second chi square rv, assumed positive
degrees of freedom of first chi square rv
degrees of freedom of second chi square rv
1 - CDF = P(X > val)
This is used in the large \(P\) asymptotics of the permutation test.
Dependencies: None