Package: qfratio 1.1.1

Junya Watanabe

qfratio: Moments and Distributions of Ratios of Quadratic Forms Using Recursion

Evaluates moments of ratios (and products) of quadratic forms in normal variables, specifically using recursive algorithms developed by Bao and Kan (2013) <doi:10.1016/j.jmva.2013.03.002> and Hillier et al. (2014) <doi:10.1017/S0266466613000364>. Also provides distribution, quantile, and probability density functions of simple ratios of quadratic forms in normal variables with several algorithms. Originally developed as a supplement to Watanabe (2023) <doi:10.1007/s00285-023-01930-8> for evaluating average evolvability measures in evolutionary quantitative genetics, but can be used for a broader class of statistics. Generating functions for these moments are also closely related to the top-order zonal and invariant polynomials of matrix arguments.

Authors:Junya Watanabe [aut, cre, cph], Patrick Alken [cph], Brian Gough [cph], Pavel Holoborodko [cph], Gerard Jungman [cph], Reid Priedhorsky [cph], Free Software Foundation, Inc. [cph]

qfratio_1.1.1.tar.gz
qfratio_1.1.1.tar.gz(r-4.5-noble)qfratio_1.1.1.tar.gz(r-4.4-noble)
qfratio_1.1.1.tgz(r-4.4-emscripten)qfratio_1.1.1.tgz(r-4.3-emscripten)
qfratio.pdf |qfratio.html
qfratio/json (API)
NEWS

# Install 'qfratio' in R:
install.packages('qfratio', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/watanabe-j/qfratio/issues

Uses libs:
  • c++– GNU Standard C++ Library v3
  • openmp– GCC OpenMP (GOMP) support library

cppopenmp

3.00 score 5 scripts 178 downloads 20 exports 3 dependencies

Last updated 10 months agofrom:b8108177ff. Checks:OK: 2. Indexed: no.

TargetResultDate
Doc / VignettesOKDec 05 2024
R-4.5-linux-x86_64OKDec 05 2024

Exports:dqfrpqfrqfm_Ap_intqfmrmqfmrm_ApBDqr_intqfmrm_ApBDqr_npiqfmrm_ApBIqr_intqfmrm_ApBIqr_npiqfmrm_IpBDqr_genqfpm_ABDpqr_intqfpm_ABpq_intqfrmqfrm_ApBq_intqfrm_ApBq_npiqfrm_ApIq_intqfrm_ApIq_npiqqfrrqfmrrqfprqfr

Dependencies:MASSRcppRcppEigen

qfratio: Moments of Ratios of Quadratic Forms

Rendered fromqfratio.Rmdusingknitr::rmarkdownon Dec 05 2024.

Last update: 2023-10-02
Started: 2023-03-16

Probability Distribution Functions in Package qfratio

Rendered fromqfratio_distr.Rmdusingknitr::rmarkdownon Dec 05 2024.

Last update: 2024-02-09
Started: 2023-10-02

Readme and manuals

Help Manual

Help pageTopics
qfratio: Moments and Distributions of Ratios of Quadratic Formsqfratio-package
Recursion for a_{p,k}a1_pk
Coefficients in polynomial expansion of generating function-single matrixd1_i dtil1_i dtil1_i_m dtil1_i_v
Coefficients in polynomial expansion of generating function-for ratios with two matricesd2_1j d2_1j_m d2_1j_v d2_ij d2_ij_m d2_ij_v d2_pj d2_pj_m d2_pj_v h2_ij h2_ij_m h2_ij_v hhat2_1j hhat2_1j_m hhat2_1j_v hhat2_pj hhat2_pj_m hhat2_pj_v htil2_1j htil2_1j_m htil2_1j_v htil2_pj htil2_pj_m htil2_pj_v
Coefficients in polynomial expansion of generating function-for ratios with three matricesd3_ijk d3_ijk_m d3_ijk_v d3_pjk d3_pjk_m d3_pjk_v h3_ijk h3_ijk_m h3_ijk_v hhat3_pjk hhat3_pjk_m hhat3_pjk_v htil3_pjk htil3_pjk_m htil3_pjk_v
Probability distribution of ratio of quadratic formsdqfr dqfr_A1I1 dqfr_broda dqfr_butler pqfr pqfr_A1B1 pqfr_butler pqfr_davies pqfr_imhof qqfr
Coefficients in polynomial expansion of generating function-for productsdtil2_1q_m dtil2_1q_v dtil2_pq dtil2_pq_m dtil2_pq_v dtil3_pqr dtil3_pqr_m dtil3_pqr_v
Calculate hypergeometric serieshgs hgs_1d hgs_2d hgs_3d
Internal C++ wrappers for GSLgsl_wrap hyperg_1F1_vec_b hyperg_2F1_mat_a_vec_c
Is this matrix diagonal?is_diagonal
Are these vectors equal?iseq
Matrix square root and generalized inverseKiK
Construct qfrm objectnew_qfpm new_qfrm
Internal C++ functionsABDpqr_int_E ABpq_int_E ApBDqr_int_Ec ApBDqr_int_Ed ApBDqr_int_El ApBDqr_npi_Ec ApBDqr_npi_Ed ApBDqr_npi_El ApBIqr_int_cEd ApBIqr_int_nEc ApBIqr_int_nEd ApBIqr_int_nEl ApBIqr_npi_Ec ApBIqr_npi_Ed ApBIqr_npi_El ApBq_int_E ApBq_npi_Ec ApBq_npi_Ed ApBq_npi_El ApIq_int_cE ApIq_int_nE ApIq_npi_cE ApIq_npi_nEc ApIq_npi_nEd ApIq_npi_nEl Ap_int_E d_A1I1_Ed d_broda_Ed d_butler_Ed IpBDqr_gen_Ec IpBDqr_gen_Ed IpBDqr_gen_El p_A1B1_Ec p_A1B1_Ed p_A1B1_El p_butler_Ed p_imhof_Ed qfrm_cpp rqfpE
Methods for qfrm and qfpm objectsmethods.qfrm plot.qfrm print.qfpm print.qfrm
Moment of multiple ratio of quadratic forms in normal variablesqfmrm qfmrm_ApBDqr_int qfmrm_ApBDqr_npi qfmrm_ApBIqr_int qfmrm_ApBIqr_npi qfmrm_IpBDqr_gen
Moment of (product of) quadratic forms in normal variablesqfm_Ap_int qfpm qfpm_ABDpqr_int qfpm_ABpq_int
Moment of ratio of quadratic forms in normal variablesqfrm qfrm_ApBq_int qfrm_ApBq_npi qfrm_ApIq_int qfrm_ApIq_npi
Get range of ratio of quadratic formsgen_eig range_qfr
Monte Carlo sampling of ratio/product of quadratic formsrqfmr rqfp rqfr
Make covariance matrix from eigenstructureS_fromUL
Summing up counter-diagonal elementssum_counterdiag sum_counterdiag3D
Matrix trace functiontr