weightedChi2P: Tail Probability for Chi Square Convolution Random Variable

View source: R/auxiliary.R

weightedChi2PR Documentation

Tail Probability for Chi Square Convolution Random Variable

Description

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)

Usage

weightedChi2P(val, w1, w2, d1, d2)

Arguments

val

observed statistic

w1

weight of first chi square rv

w2

weight of second chi square rv, assumed positive

d1

degrees of freedom of first chi square rv

d2

degrees of freedom of second chi square rv

Details

This is used in the large P asymptotics of the permutation test.

Dependencies: None

Value

1 - CDF = P(X > val)


flintyR documentation built on March 31, 2023, 8:19 p.m.