MuGen
Multitrait genetics
|
Multiplicative redundant parameter. More...
#include <MuGen.h>
Public Member Functions | |
Apex () | |
Default constructor. More... | |
Apex (const size_t &d, vector< vector< double > > &fE) | |
Dimension-only constructor. More... | |
Apex (const double &dV, const size_t &d, vector< vector< double > > &fE) | |
Diagonal prior constructor. More... | |
Apex (const SigmaI &SigI, vector< vector< double > > &fE) | |
Covariance prior constructor. More... | |
~Apex () | |
Destructor. | |
Apex (const Apex &A) | |
Copy constructor. More... | |
Apex & | operator= (const Apex &A) |
Assignement constructor. More... | |
gsl_matrix * | getMat () |
Get redundant parameter matrix. | |
const gsl_matrix * | getMat () const |
Get redundant parameter matrix. | |
void | setPr (const double &pr) |
Set prior value. More... | |
void | update (const Grp &y, const gsl_matrix *xi, const SigmaI &SigIm) |
Unreplicated Gaussian update. More... | |
void | update (const Grp &y, const gsl_matrix *xi, const SigmaI &SigIm, const RanIndex &ind) |
Replicated Gaussian update. More... | |
void | update (const Grp &y, const gsl_matrix *xi, const Qgrp &q, const SigmaI &SigIm, const RanIndex &ind) |
Replicated Student- \(t\) update. More... | |
Multiplicative redundant parameter.
Implements multiplicative redundant parametrization for analogs of frequentist random-effects models. It is a multivariate extension of well-established multiplicative data augmentation schemes [gelman07] [gelman08] (Greenberg, unpublished). Here, instead of a scalar redundant parameter, I am using a redundant parameter matrix. This approach introduces additional per-iteration computational burden, but results in much faster model convergence in some cases (Greenberg, unpublished). Therefore, it should only be used when convergence problems are severe and cannot be eliminated with simpler re-parametrizations.
Apex::Apex | ( | ) |
Default constructor.
All matrices are set to be \( 1 \times 1 \) with the element equal to 1.
Apex::Apex | ( | const size_t & | d, |
vector< vector< double > > & | fE | ||
) |
Dimension-only constructor.
Initializes a vague prior with diagonal elements set to \( 10^{-6} \).
[in] | size_t& | dimension (i.e. number of traits) |
[in] | vector<vector | <double> >& fitted values |
Apex::Apex | ( | const double & | dV, |
const size_t & | d, | ||
vector< vector< double > > & | fE | ||
) |
Diagonal prior constructor.
Initializes a prior with diagonal elements set to the given value.
[in] | double& | inverse-prior value |
[in] | size_t& | dimension (i.e. number of traits) |
[in] | vector<vector | <double> >& fitted values |
Apex::Apex | ( | const SigmaI & | SigI, |
vector< vector< double > > & | fE | ||
) |
Covariance prior constructor.
Initializes a prior with the given inverse-covariance matrix. Dimension is set to the dimension of the prior matrix.
[in] | SigmaI& | inverse-prior matrix |
[in] | vector<vector | <double> >& fitted values |
Apex::Apex | ( | const Apex & | A | ) |
Copy constructor.
[in] | Apex& | object to be copied |
void Apex::setPr | ( | const double & | pr | ) |
Set prior value.
Sets the diagonal of the inverse-prior matrix to the given value
[in] | double& | inverse-prior value |