MuGen
Multitrait genetics
Public Member Functions | List of all members
Apex Class Reference

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...
 
Apexoperator= (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...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ Apex() [1/5]

Apex::Apex ( )

Default constructor.

All matrices are set to be \( 1 \times 1 \) with the element equal to 1.

◆ Apex() [2/5]

Apex::Apex ( const size_t &  d,
vector< vector< double > > &  fE 
)

Dimension-only constructor.

Initializes a vague prior with diagonal elements set to \( 10^{-6} \).

Parameters
[in]size_t&dimension (i.e. number of traits)
[in]vector<vector<double> >& fitted values

◆ Apex() [3/5]

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.

Parameters
[in]double&inverse-prior value
[in]size_t&dimension (i.e. number of traits)
[in]vector<vector<double> >& fitted values

◆ Apex() [4/5]

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.

Parameters
[in]SigmaI&inverse-prior matrix
[in]vector<vector<double> >& fitted values

◆ Apex() [5/5]

Apex::Apex ( const Apex A)

Copy constructor.

Parameters
[in]Apex&object to be copied

Member Function Documentation

◆ operator=()

Apex & Apex::operator= ( const Apex A)

Assignement constructor.

Parameters
[in]Apex&object to be copied
Returns
Apex object

◆ setPr()

void Apex::setPr ( const double &  pr)

Set prior value.

Sets the diagonal of the inverse-prior matrix to the given value

Parameters
[in]double&inverse-prior value

The documentation for this class was generated from the following files: