MuGen
Multitrait genetics
Modules | Functions
Overloaded update methods
Collaboration diagram for Overloaded update methods:

Modules

 Improper prior methods
 
 0-mean prior methods
 
 non-0-mean prior methods
 

Functions

void RanIndex::update (const Grp &theta, const Grp &mu, const vector< SigmaI > &SigI, const MixP &p)
 Update mixture model with multiple covariances. More...
 
void RanIndex::update (const Grp &theta, const Grp &mu, const SigmaI &SigI, const MixP &p)
 Update mixture model with a single covariance. More...
 
virtual void RanIndex::update (const Grp &y, const SigmaI &SigIe, BetaGrpBVSR *theta, const SigmaI &SigIp)
 Variable selection update. More...
 
void Apex::update (const Grp &y, const gsl_matrix *xi, const SigmaI &SigIm)
 Unreplicated Gaussian update. More...
 
void Apex::update (const Grp &y, const gsl_matrix *xi, const SigmaI &SigIm, const RanIndex &ind)
 Replicated Gaussian update. More...
 
void Apex::update (const Grp &y, const gsl_matrix *xi, const Qgrp &q, const SigmaI &SigIm, const RanIndex &ind)
 Replicated Student- \(t\) update. More...
 
virtual void MuGrpMiss::update (const Grp &mu, const SigmaI &SigIm)
 Standard Gaussian imputation. More...
 
virtual void MuGrpMiss::update (const Grp &mu, const SigmaI &SigIm, const SigmaI &SigIp)
 Gaussian imputation with a prior. More...
 
virtual void MuGrpEE::update (const Grp &muPr, const SigmaI &SigIm)
 Gaussian prior. More...
 
virtual void MuGrpEE::update (const Grp &muPr, const Qgrp &q, const SigmaI &SigIm)
 Student- \(t\) prior. More...
 
void BetaGrpSnp::update (const Grp &dat, const SigmaI &SigIm)
 Response update function. More...
 
void BetaGrpSnpMiss::update (const Grp &dat, const SigmaI &SigIm)
 Response update function. More...
 
virtual void SigmaI::update (const Grp &dat)
 Basic Gaussian update. More...
 
virtual void SigmaI::update (const Grp &dat, const Grp &mu)
 Gaussian update with a mean. More...
 
virtual void SigmaI::update (const Grp &dat, const Qgrp &q)
 Basic Student- \(t\) update. More...
 
virtual void SigmaI::update (const Grp &dat, const Grp &mu, const Qgrp &q)
 Student- \(t\) update with a mean. More...
 
virtual void Qgrp::update (const Grp &dat, const Grp &mu, const SigmaI &SigI)
 Update with a mean. More...
 
virtual void Qgrp::update (const Grp &dat, const SigmaI &SigI)
 Basic update. More...
 
void MixP::update (const RanIndex &Nvec)
 Gibbs update function. More...
 

Detailed Description

Update functions generate new stochastic values of a given parameter or set of parameters as we step through the Markov chain iteration. These are mostly Gibbs updates, but occasional Metropolis steps are used in special cases.

Function Documentation

◆ update() [1/19]

void SigmaI::update ( const Grp dat)
virtual

Basic Gaussian update.

The data are assumed already centered, so the update is based on the simple cross-product of the data.

Parameters
[in]Grp&data

Reimplemented in SigmaIblk.

◆ update() [2/19]

void SigmaI::update ( const Grp dat,
const Grp mu 
)
virtual

Gaussian update with a mean.

The mean value is subtracted from the data according to the up-pointing RanIndex in the data object.

Parameters
[in]Grp&data
[in]Grp&mean

Reimplemented in SigmaIblk.

◆ update() [3/19]

void SigmaI::update ( const Grp dat,
const Grp mu,
const Qgrp q 
)
virtual

Student- \(t\) update with a mean.

The mean value is subtracted from the data according to the up-pointing RanIndex in the data object.

Parameters
[in]Grp&data
[in]Grp&mean
[in]Qgrp&scale parameter

Reimplemented in SigmaIpex.

◆ update() [4/19]

void Qgrp::update ( const Grp dat,
const Grp mu,
const SigmaI SigI 
)
virtual

Update with a mean.

The mean value is subtracted from the data according to the up-pointing RanIndex in the data object.

Parameters
[in]Grp&data
[in]Grp&mean
[in]SigmaI&inverse-covariance

Reimplemented in QgrpPEX.

◆ update() [5/19]

void SigmaI::update ( const Grp dat,
const Qgrp q 
)
virtual

Basic Student- \(t\) update.

The data are assumed already centered, so the update is based on the simple cross-product of the data and the current value of the scale parameter.

Parameters
[in]Grp&data
[in]Qgrp&scale parameter

Reimplemented in SigmaIpex.

◆ update() [6/19]

void Qgrp::update ( const Grp dat,
const SigmaI SigI 
)
virtual

Basic update.

The data are assumed already centered, so the update is based on the simple cross-product of the data and the current value of the inverse-covariance.

Parameters
[in]Grp&data
[in]SigmaI&inverse-covariance

Reimplemented in QgrpPEX.

◆ update() [7/19]

void BetaGrpSnp::update ( const Grp dat,
const SigmaI SigIm 
)
virtual

Response update function.

Unlike standard update functions, this one only saves MCMC samples of the response. The covariance provided is ignored.
The actual regression is performed on the point estimates of response values calculated as means of the stored MCMC values, and is done at the end by envoking the dump() function.

Parameters
[in]Grp&response variable to be saved
[in]SigmaI&inverse-covariance (ignored)

Reimplemented from MuGrp.

◆ update() [8/19]

void BetaGrpSnpMiss::update ( const Grp dat,
const SigmaI SigIm 
)
virtual

Response update function.

Unlike standard update functions, this one only saves MCMC samples of the response. The covariance provided is ignored. The actual regression is performed on the point estimates of response values calculated as means of the stored MCMC values, and is done at the end by envoking the dump() function.

Parameters
[in]Grp&response variable to be saved
[in]SigmaI&inverse-covariance (ignored)

Reimplemented from MuGrp.

◆ update() [9/19]

void MuGrpMiss::update ( const Grp mu,
const SigmaI SigIm 
)
virtual

Standard Gaussian imputation.

If some data are present, performs standard Gaussian marginal imputation (desribed in, e.g., [chatfield80] ) with the provided Grp object as a mean and the SigmaI object as the inverse-covariance. If no data for a row are present, simply replaces the row values by a Gaussian sample with mean and inverse-covariance provided. Rows with no missing data are ignored.

Parameters
[in]Grp&mean
[in]SigmaI&inverse-covariance

Reimplemented from MuGrp.

Reimplemented in MuGrpEEmiss.

◆ update() [10/19]

void MuGrpMiss::update ( const Grp mu,
const SigmaI SigIm,
const SigmaI SigIp 
)
virtual

Gaussian imputation with a prior.

If some data are present, performs Gaussian marginal imputation (desribed in, e.g., [chatfield80] ) with the provided Grp object as a mean and the SigmaI object as the inverse-covariance, but with a 0-mean prior. If no data for a row are present, simply replaces the row values by a Gaussian sample with mean and inverse-covariance provided. Rows with no missing data are ignored.

Warning
Has not been extensively tested
Parameters
[in]Grp&mean
[in]SigmaI&inverse-covariance
[in]SigmaI&prior inverse-covariance

Reimplemented from MuGrp.

◆ update() [11/19]

void MuGrpEE::update ( const Grp muPr,
const Qgrp q,
const SigmaI SigIm 
)
virtual

Student- \(t\) prior.

The Grp object contains the prior means and the SigmaI object – the prior inverse-covariance for the sampling of data values. The upper index of the object must have the same number of groups as the number of rows in the prior matrix addressed by fMat(). While the sampling is independent, the prior inverse variances for each trait are taken from the diagonal of the inverse-covariance matrix (in the SigmaI object), and are thus influenced by any correlated traits.

Parameters
[in]Grp&prior mean
[in]Qgrp&Student- \(t\) weights
[in]SigmaI&prior inverse-covariance

Reimplemented from MuGrp.

◆ update() [12/19]

void MuGrpEE::update ( const Grp muPr,
const SigmaI SigIm 
)
virtual

Gaussian prior.

The Grp object contains the prior means and the SigmaI object – the prior inverse-covariance for the sampling of data values. The upper index of the object must have the same number of groups as the number of rows in the prior matrix addressed by fMat(). While the sampling is independent, the prior inverse variances for each trait are taken from the diagonal of the inverse-covariance matrix (in the SigmaI object), and are thus influenced by any correlated traits.

Parameters
[in]Grp&prior mean
[in]SigmaI&prior inverse-covariance

Reimplemented from MuGrp.

◆ update() [13/19]

void RanIndex::update ( const Grp theta,
const Grp mu,
const SigmaI SigI,
const MixP p 
)

Update mixture model with a single covariance.

Updates the group relationships for Gaussian mixture models when each group has a different mean but all covrariances are the same.

Parameters
[in]Grp&data
[in]Grp&group means
[in]SigmaI&common inverse-covariance
[in]MixP&prior proportions

◆ update() [14/19]

void RanIndex::update ( const Grp theta,
const Grp mu,
const vector< SigmaI > &  SigI,
const MixP p 
)

Update mixture model with multiple covariances.

Updates the group relationships for Gaussian mixture models when each group has a different mean and covariance.

Parameters
[in]Grp&data
[in]Grp&group means
[in]vector<SigmaI>&vector of inverse-covariances
[in]MixP&prior proportions

◆ update() [15/19]

void Apex::update ( const Grp y,
const gsl_matrix *  xi,
const Qgrp q,
const SigmaI SigIm,
const RanIndex ind 
)

Replicated Student- \(t\) update.

Student- \(t\) data with replication, i.e., the number of rows in \( \boldsymbol{Y} \) is larger than the number of rows in \( \boldsymbol{\Xi} \).

Parameters
[in]Grp&data
[in]gsl_matrix*"raw" location parameter matrix
[in]Qgrp&Student- \(t\) weights
[in]SigmaI&data inverse-covariance matrix
[in]RanIndex&index relating data rows to rows in \( \boldsymbol{\Xi} \)

◆ update() [16/19]

void Apex::update ( const Grp y,
const gsl_matrix *  xi,
const SigmaI SigIm 
)

Unreplicated Gaussian update.

Gaussian data with no replication.

Parameters
[in]Grp&data
[in]gsl_matrix*"raw" location parameter matrix
[in]SigmaI&data inverse-covariance matrix

◆ update() [17/19]

void Apex::update ( const Grp y,
const gsl_matrix *  xi,
const SigmaI SigIm,
const RanIndex ind 
)

Replicated Gaussian update.

Gaussian data with replication, i.e., the number of rows in \( \boldsymbol{Y} \) is larger than the number of rows in \( \boldsymbol{\Xi} \).

Parameters
[in]Grp&data
[in]gsl_matrix*"raw" location parameter matrix
[in]SigmaI&data inverse-covariance matrix
[in]RanIndex&index relating data rows to rows in \( \boldsymbol{\Xi} \)

◆ update() [18/19]

virtual void RanIndex::update ( const Grp y,
const SigmaI SigIe,
BetaGrpBVSR theta,
const SigmaI SigIp 
)
inlinevirtual

Variable selection update.

Update for a mixture that includes point-mass at 0. Only implemented in the derived class.

Parameters
[in]Grp&data
[in]SigmaI&likelihood inverse-covariance
[in]BetaGrpBVSR*location parameter values
[in]SigmaI&prior inverse-covariance

Reimplemented in RanIndexVS.

◆ update() [19/19]

void MixP::update ( const RanIndex Nvec)

Gibbs update function.

Performs standard Gibbs mixture updating (e.g., [gelman04] ) with samples from a Dirichlet distribution.

Parameters
[in]RanIndex&data index of which elements belong to which category