MuGen
Multitrait genetics
|
Functions | |
void | MuGrpPEX::_updateFitted () |
Update adjusted values. More... | |
virtual void | BetaGrpFt::_updateFitted () |
Update fitted values. | |
void | BetaGrpPEX::_updateAfitted () |
Calculate redundant parameter fitted values. More... | |
void | BetaGrpBVSR::_updateFitted () |
Update fitted values. | |
void | BetaBlk::_updateFitted () |
Update fitted values. | |
Protected member functions of the derived Grp classes that implement multiple regressions in some form. In Gibbs sampling for multiple regression, it is necessary to calculate partial fitted matrices of the form \( \boldsymbol{X}_{\cdot -k}\boldsymbol{B}_{-k \cdot} \) for each \(k\)-th predictor (i.e., product for all but the \(k\)-th predictor), as well as the complete fitted matrix \( \boldsymbol{C} = \boldsymbol{XB} \). Here, \( \boldsymbol{X} \) is the predictor matrix and \( \boldsymbol{B} \) is the matrix of regression coefficients. This process is typically the bottleneck of the Gibbs sampler when even a moderate number of predictors ( \( \geq 100 \)) are in the model. The key idea in implementing these functions is that the multiplications required to calculate all the partial matrix products are also necessary for computing the complete fitted matrix. Thus, elements of the complete matrix
\[ c_{i,j} = \sum_k x_{i,k}\beta_{k,j} \]
are calculated first, then the individual \( x_{i,k}\beta_{k,j} \) are subtracted to get the required partial fitted matrices. Further speed-ups are achieved by parallelizing the calculations by row of the regression coefficient matrix (i.e. by individual predictor).
|
protected |
Calculate redundant parameter fitted values.
Calculates separate \( \left(\boldsymbol{X \Xi A}\right)_{\cdot -p} \) for each trait \( p \).
|
protected |
Update adjusted values.
Creates the adjusted value matrix and the individual \( \boldsymbol{\Xi}_{\cdot -m}\boldsymbol{A}_{-m\cdot} \).