MuGen
Multitrait genetics
|
Student- \(t\) weights for PEX. More...
#include <MuGen.h>
Public Member Functions | |
QgrpPEX () | |
Default constructor. | |
QgrpPEX (const size_t &N) | |
Deterministic size-only constructor. More... | |
QgrpPEX (const size_t &N, const double &nu) | |
Deterministic constructor with degrees of freedom. More... | |
QgrpPEX (const size_t &N, const double &nu, const string &misVecFlNam) | |
Deterministic constructor with degrees of freedom and missing values. More... | |
QgrpPEX (const size_t &N, const string &outFileNam) | |
Deterministic size-only constructor with output file name. More... | |
QgrpPEX (const size_t &N, const string &outFileNam, const double &nu) | |
Deterministic constructor with degrees of freedom and output file name. More... | |
QgrpPEX (const size_t &N, const string &outFileNam, const double &nu, const string &misVecFlNam) | |
Deterministic constructor with degrees of freedom, missing values and output file name. More... | |
double | alpha () const |
Const access to \(\alpha\). More... | |
double | alpha () |
Access to \(\alpha\). More... | |
void | update (const Grp &dat, const Grp &mu, const SigmaI &SigI) |
Update with a mean. More... | |
void | update (const Grp &dat, const SigmaI &SigI) |
Basic update. More... | |
Public Member Functions inherited from Qgrp | |
Qgrp () | |
Default constructor. More... | |
Qgrp (const size_t &N) | |
Deterministic size-only constructor. More... | |
Qgrp (const size_t &N, const double &nu) | |
Deterministic constructor with degrees of freedom. More... | |
Qgrp (const size_t &N, const double &nu, const string &misVecFlNam) | |
Deterministic constructor with degrees of freedom and missing values. More... | |
Qgrp (const size_t &N, const string &outFileNam) | |
Deterministic size-only constructor with output file name. More... | |
Qgrp (const size_t &N, const string &outFileNam, const double &nu) | |
Deterministic constructor with degrees of freedom and output file name. More... | |
Qgrp (const size_t &N, const string &outFileNam, const double &nu, const string &misVecFlNam) | |
Deterministic constructor with degrees of freedom, missing values and output file name. More... | |
virtual | ~Qgrp () |
Destructor. | |
double | operator[] (const size_t i) const |
Const subscript operator. More... | |
double | operator[] (const size_t i) |
Subscript operator. More... | |
size_t | size () const |
Const length of the weight vector. More... | |
size_t | size () |
Length of the weight vector. More... | |
void | save (const char *how="a") |
Save to a stored file name. More... | |
void | save (const string &fileNam, const char *how="a") |
Save to a given file name. More... | |
Protected Attributes | |
double | _alpha |
Redundant parameter \(\alpha\). | |
Protected Attributes inherited from Qgrp | |
vector< double > | _qVec |
Vector of weights. | |
vector< size_t > | _presInd |
Vector of indexes of present data. More... | |
double | _nu |
Student- \(t\) degrees of freedom. | |
string | _outFile |
Output file name. | |
gsl_rng * | _r |
Pseudo-random number generator. More... | |
Student- \(t\) weights for PEX.
Implements the weight updating for van Dyk and Meng's [dyk01] PEX scheme. The multiplicative redundant parameter \(\alpha\) is a member of this class and is updated internally. \(\alpha\) is initialized deterministically to 1.0.
|
inline |
Deterministic size-only constructor.
Creates a vector of weights that all equal to 1.0, and three degrees of freedom (the smallest possible that still gives a destribution with defined mean and variance).
[in] | size_t& | number of weights |
|
inline |
Deterministic constructor with degrees of freedom.
Creates a vector of weights that all equal to 1.0, and degrees of freedom set to the given value.
[in] | size_t& | number of weights |
[in] | double& | degrees of freedom |
|
inline |
Deterministic constructor with degrees of freedom and missing values.
Creates a vector of weights that all equal to 1.0, and degrees of freedom set to the given value. The given file is read to determine which rows of data have missing values.
[in] | size_t& | number of weights |
[in] | double& | degrees of freedom |
[in] | string& | missing value file name |
|
inline |
Deterministic size-only constructor with output file name.
Creates a vector of weights that all equal to 1.0, and three degrees of freedom (the smallest possible that still gives a destribution with defined mean and variance).
[in] | size_t& | number of weights |
[in] | string& | output file name |
|
inline |
Deterministic constructor with degrees of freedom and output file name.
Creates a vector of weights that all equal to 1.0, and degrees of freedom set to the given value.
[in] | size_t& | number of weights |
[in] | string& | output file name |
[in] | double& | degrees of freedom |
|
inline |
Deterministic constructor with degrees of freedom, missing values and output file name.
Creates a vector of weights that all equal to 1.0, and degrees of freedom set to the given value. The given file is read to determine which rows of data have missing values.
[in] | size_t& | number of weights |
[in] | string& | output file name |
[in] | double& | degrees of freedom |
[in] | string& | missing value file name |
|
inlinevirtual |
Access to \(\alpha\).
Access to the van Dyk and Meng \(\alpha\) multiplicative redundant parameter. Is equal to 1.0 in this class.
Reimplemented from Qgrp.
|
inlinevirtual |
Const access to \(\alpha\).
Access to the van Dyk and Meng \(\alpha\) multiplicative redundant parameter. Is equal to 1.0 in this class.
Reimplemented from Qgrp.
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.
[in] | Grp& | data |
[in] | SigmaI& | inverse-covariance |
Reimplemented from Qgrp.