k: Numerator degrees of freedom for this test statistic
p: Total number of predictors in the design matrix (except for the intercept)
n: Sample size
lim: Maximum number of integration terms. Realistic values for "lim" range from 1,000 if the procedure is to be called repeatedly up to 50,000 if it is to be called only occasionally
acc: Error bound. Suitable values for "acc" range from 0.001 to 0.00005 which should be adequate for most statistical purposes.
Returns
Output of CompQuadForm::davies()
References
Davies, R. B. (1980). The Distribution of a Linear Combination of chi-square Random Variables. Journal of the Royal Statistical Society. Series C (Applied Statistics), 29(3), 323-333.
Duchesne, P., & De Micheaux, P. L. (2010). Computing the distribution of quadratic forms: Further comparisons between the Liu-Tang-Zhang approximation and exact methods. Computational Statistics and Data Analysis, 54(4), 858-862.
McArtor, D. B., Lubke, G. H., & Bergeman, C. S. (2017). Extending multivariate distance matrix regression with an effect size measure and the distribution of the test statistic. Psychometrika, 82, 1052-1077.