farebrother {CompQuadForm} | R Documentation |
Distribution function (survival function in fact) of quadratic forms in normal variables using Farebrother's algorithm.
farebrother(q,lambda,h = rep(1, length(lambda)),delta = rep(0, length(lambda)),maxit=100000,eps=10^(-10),mode=1)
q |
value point at which distribution function is to be evaluated |
lambda |
the weights λ_1, λ_2, ..., λ_n, i.e. the distinct non-zero characteristic roots of A.Sigma |
h |
vector of the respective orders of multiplicity m_i of the lambdas |
delta |
the non-centrality parameters delta_i |
maxit |
the maximum number of term K in equation below |
eps |
the desired level of accuracy |
mode |
if mode>0 then β=mode*λ_{min} otherwise β=β_B=2/(1/λ_{min}+1/λ_{max}) |
Computes P[Q>q] where Q=sum_{j=1}^n lambda_j chi^2(m_j,delta_j^2). P[Q<q] is approximated by ∑_k=0^{K-1} a_k P[χ^2(m+2k)<q/β] where m=∑_{j=1}^n m_j and β is an arbitrary constant (as given by argument mode).
Qq |
P[Q>q] |
Pierre Lafaye de Micheaux (lafaye@dms.umontreal.ca) and Pierre Duchesne (duchesne@dms.umontreal.ca)
P. Duchesne, P. Lafaye de Micheaux, Computing the distribution of quadratic forms: Further comparisons between the Liu-Tang-Zhang approximation and exact methods, Computational Statistics and Data Analysis, Volume 54, (2010), 858-862
Farebrother R.W., Algorithm AS 204: The distribution of a Positive Linear Combination of chi-squared random variables, Journal of the Royal Statistical Society, Series C (applied Statistics), Vol. 33, No. 3 (1984), p. 332-339
# Some results from Table 3, p.327, Davies (1980) farebrother(1,c(6,3,1),c(1,1,1),c(0,0,0))