value point at which the survival function is to be evaluated
lambda
distinct non-zero characteristic roots of A.Sigma
h
respective orders of multiplicity of the lambdas
delta
non-centrality parameters
epsabs
absolute accuracy requested
epsrel
relative accuracy requested
limit
limit determines the maximum number of subintervals in the partition of the given integration interval
Details
Let strong{X}=(X_1,...,X_n)' be a column random vector which follows a multidimensional normal law with mean vector strong{0} and non-singular covariance matrix strong{Sigma}.
Let strong{mu}=(mu_1,...,mu_n)' be a constant vector, and consider the quadratic form
The λ_r's are the distinct non-zero characteristic roots of
A.Sigma, the h_r's their respective orders of
multiplicity, the delta_r's are certain linear combinations
of mu_1,...,mu_n and the
chi^2_{h_r;delta_r} are independent
chi^2-variables with h_r degrees of freedom and
non-centrality parameter delta_r. The variable
chi^2_{h;delta} is defined here by the
relation chi^2_{h,delta}=(X_1 + delta)^2+
sum_{i=2}^h X_i^2, where X_1,...,X_h are
independent unit normal deviates.
Value
Qq
P[Q>q]
abserr
estimate of the modulus of the absolute error, which should equal or exceed abs(i-result)
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
J. P. Imhof, Computing the Distribution of Quadratic Forms in Normal Variables, Biometrika, Volume 48, Issue 3/4 (Dec., 1961), 419-426
Examples
# Some results from Table 1, p.424, Imhof (1961)
# Q1 with x = 2
round(imhof(2,c(0.6,0.3,0.1))$Qq,4)
# Q2 with x = 6
round(imhof(6,c(0.6,0.3,0.1),c(2,2,2))$Qq,4)
# Q6 with x = 15
round(imhof(15,c(0.7,0.3),c(1,1),c(6,2))$Qq,4)
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(CompQuadForm)
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/CompQuadForm/imhof.Rd_%03d_medium.png", width=480, height=480)
> ### Name: imhof
> ### Title: Imhof method.
> ### Aliases: imhof
> ### Keywords: distribution htest
>
> ### ** Examples
>
> # Some results from Table 1, p.424, Imhof (1961)
>
> # Q1 with x = 2
> round(imhof(2,c(0.6,0.3,0.1))$Qq,4)
[1] 0.124
>
> # Q2 with x = 6
> round(imhof(6,c(0.6,0.3,0.1),c(2,2,2))$Qq,4)
[1] 0.0161
>
> # Q6 with x = 15
> round(imhof(15,c(0.7,0.3),c(1,1),c(6,2))$Qq,4)
[1] 0.0223
>
>
>
>
>
>
> dev.off()
null device
1
>