MuGen
Multitrait genetics
|
Go to the documentation of this file.
36 #include <gsl/gsl_matrix.h>
37 #include <gsl/gsl_vector.h>
38 #include <gsl/gsl_rng.h>
39 #include <gsl/gsl_permutation.h>
110 void MVgauss(
const gsl_vector*,
const gsl_matrix*,
const gsl_rng*, gsl_vector*);
123 void Wishart(
const gsl_matrix*,
const int&,
const gsl_rng*, gsl_matrix*);
124 void Wishart(
const gsl_matrix*,
const size_t&,
const gsl_rng*, gsl_matrix*);
137 size_t rtgeom(
const double&,
const size_t&,
const gsl_rng*);
155 double mhl(
const gsl_vector *beta,
const gsl_matrix *SigI);
174 void colCenter(
const gsl_matrix *source, gsl_matrix *res);
181 void colCenter(gsl_matrix *inplace,
const double &absLab);
191 void colCenter(
const gsl_matrix *source, gsl_matrix *res,
const double &absLab);
205 void vecCenter(
const gsl_vector *source, gsl_vector *res);
212 void meanImpute(gsl_matrix *inplace,
const double &absLab);
231 unsigned long long rdtsc();
286 MVnorm(gsl_vector *mn,
const gsl_vector *sd,
const gsl_rng *r);
296 MVnorm(gsl_vector *mn,
const gsl_matrix *Sig,
const gsl_rng *r);
304 MVnorm(gsl_matrix *mn,
const size_t &iRw);
315 MVnorm(gsl_matrix *mn,
const size_t &iRw,
const gsl_vector *sd,
const gsl_rng *r);
326 MVnorm(gsl_matrix *mn,
const size_t &iRw,
const gsl_matrix *Sig,
const gsl_rng *r);
502 virtual double mhl(
const gsl_vector *x,
const SigmaI &SigI);
512 virtual double mhl(
const gsl_vector *x,
const SigmaI &SigI)
const;
530 virtual double mhl(
const SigmaI &SigI)
const;
555 double density(
const gsl_vector *theta,
const SigmaI &SigI)
const;
584 void save(
const string &fileNam,
const char *how =
"a");
592 void save(FILE *fileStr);
602 double operator[](
const size_t i)
const{
return gsl_vector_get(&
_vec.vector, i); };
611 void valSet(
const size_t i,
const double x){gsl_vector_set(&
_vec.vector, i, x); };
631 virtual size_t nMissP()
const{
return 0; };
639 virtual const vector<size_t>
getMisPhen()
const{
return vector<size_t>(0); };
647 virtual const vector<size_t> *
down()
const{
return 0; };
655 virtual const size_t *
up()
const{
return 0; };
713 MVnormMu(
const size_t &d,
const vector<size_t> &low,
const size_t &
up);
723 MVnormMu(gsl_vector *mn,
const vector<size_t> &low,
const size_t &
up);
741 MVnormMu(gsl_matrix *mn,
const size_t &iRw);
751 MVnormMu(gsl_matrix *mn,
const size_t &iRw,
const vector<size_t> &low);
762 MVnormMu(gsl_matrix *mn,
const size_t &iRw,
const vector<size_t> &low,
const size_t &
up);
772 MVnormMu(gsl_matrix *mn,
const size_t &iRw,
const size_t &
up);
784 MVnormMu(gsl_vector *mn,
const gsl_vector *sd,
const gsl_rng *r,
const vector<size_t> &low,
const size_t &
up);
796 MVnormMu(gsl_vector *mn,
const gsl_matrix *Sig,
const gsl_rng *r,
const vector<size_t> &low,
const size_t &
up);
809 MVnormMu(gsl_matrix *mn,
const size_t &iRw,
const gsl_vector *sd,
const gsl_rng *r,
const vector<size_t> &low,
const size_t &
up);
822 MVnormMu(gsl_matrix *mn,
const size_t &iRw,
const gsl_matrix *Sig,
const gsl_rng *r,
const vector<size_t> &low,
const size_t &
up);
849 virtual void update(
const Grp &dat,
const SigmaI &SigIm,
const gsl_rng *r);
853 virtual void update(
const Grp &dat,
const SigmaI &SigIm,
const double &qPr,
const SigmaI &SigIp,
const gsl_rng *r);
855 virtual void update(
const Grp &dat,
const Qgrp &q,
const SigmaI &SigIm,
const double &qPr,
const SigmaI &SigIp,
const gsl_rng *r);
858 virtual void update(
const Grp &dat,
const SigmaI &SigIm,
const Grp &muPr,
const double &qPr,
const SigmaI &SigIp,
const gsl_rng *r);
860 virtual void update(
const Grp &dat,
const Qgrp &q,
const SigmaI &SigIm,
const Grp &muPr,
const double &qPr,
const SigmaI &SigIp,
const gsl_rng *r);
862 virtual size_t nMissP()
const{
return 0; };
863 virtual const vector<size_t>
getMisPhen()
const{
return vector<size_t>(0); };
917 MVnormMuPEX(gsl_matrix *mn,
const size_t &iRw,
const vector<size_t> &low,
const size_t &
up,
Apex &A, gsl_matrix *tSigIAt);
930 MVnormMuPEX(gsl_matrix *mn,
const size_t &iRw,
const gsl_vector *sd,
const gsl_rng *r,
const vector<size_t> &low,
const size_t &
up,
Apex &A, gsl_matrix *tSigIAt);
953 virtual void update(
const Grp &dat,
const SigmaI &SigIm,
const double &qPr,
const SigmaI &SigIp,
const gsl_rng *r);
955 virtual void update(
const Grp &dat,
const Qgrp &q,
const SigmaI &SigIm,
const double &qPr,
const SigmaI &SigIp,
const gsl_rng *r);
958 virtual void update(
const Grp &dat,
const SigmaI &SigIm,
const Grp &muPr,
const double &qPr,
const SigmaI &SigIp,
const gsl_rng *r);
960 virtual void update(
const Grp &dat,
const Qgrp &q,
const SigmaI &SigIm,
const Grp &muPr,
const double &qPr,
const SigmaI &SigIp,
const gsl_rng *r);
1011 MVnormBetaPEX(
const gsl_matrix *resp, gsl_matrix *pred,
const size_t &iCl, vector<double> &eaFt,
const gsl_matrix *Sig,
const gsl_rng *r,
const size_t &
up, gsl_matrix *bet,
const size_t &iRw,
Apex &A, gsl_matrix *tSigIAt);
1027 MVnormBetaPEX(
const size_t &d, gsl_matrix *pred,
const size_t &iCl, vector<double> &eaFt,
const size_t &
up, gsl_matrix *bet,
const size_t &iRw,
Apex &A, gsl_matrix *tSigIAt);
1050 void update(
const Grp &dat,
const SigmaI &SigIm,
const double &qPr,
const SigmaI &SigIp,
const gsl_rng *r);
1052 void update(
const Grp &dat,
const Qgrp &q,
const SigmaI &SigIm,
const double &qPr,
const SigmaI &SigIp,
const gsl_rng *r);
1055 void update(
const Grp &dat,
const SigmaI &SigIm,
const Grp &muPr,
const double &qPr,
const SigmaI &SigIp,
const gsl_rng *r);
1057 void update(
const Grp &dat,
const Qgrp &q,
const SigmaI &SigIm,
const Grp &muPr,
const double &qPr,
const SigmaI &SigIp,
const gsl_rng *r);
1099 MVnormMuMiss(
const size_t &d,
const vector<size_t> &low,
const size_t &
up,
const vector<size_t> &mis);
1109 MVnormMuMiss(gsl_vector *mn,
const vector<size_t> &low,
const size_t &
up,
const vector<size_t> &mis);
1117 MVnormMuMiss(gsl_vector *mn,
const size_t &
up,
const vector<size_t> &mis);
1129 MVnormMuMiss(gsl_vector *mn,
const gsl_vector *sd,
const gsl_rng *r,
const vector<size_t> &low,
const size_t &
up,
const vector<size_t> &mis);
1141 MVnormMuMiss(gsl_vector *mn,
const gsl_matrix *Sig,
const gsl_rng *r,
const vector<size_t> &low,
const size_t &
up,
const vector<size_t> &mis);
1151 MVnormMuMiss(gsl_matrix *mn,
const size_t &iRw,
const vector<size_t> &low,
const size_t &
up,
const vector<size_t> &mis);
1160 MVnormMuMiss(gsl_matrix *mn,
const size_t &iRw,
const size_t &
up,
const vector<size_t> &mis);
1173 MVnormMuMiss(gsl_matrix *mn,
const size_t &iRw,
const gsl_vector *sd,
const gsl_rng *r,
const vector<size_t> &low,
const size_t &
up,
const vector<size_t> &mis);
1186 MVnormMuMiss(gsl_matrix *mn,
const size_t &iRw,
const gsl_matrix *Sig,
const gsl_rng *r,
const vector<size_t> &low,
const size_t &
up,
const vector<size_t> &mis);
1295 MVnormBeta(gsl_vector *b,
const gsl_vector *sd, gsl_matrix *pred,
const size_t &iCl,
const gsl_rng *r);
1308 MVnormBeta(gsl_vector *b,
const gsl_vector *sd, gsl_matrix *pred,
const size_t &iCl,
const gsl_rng *r,
const size_t &
up);
1321 MVnormBeta(gsl_vector *b,
const gsl_matrix *Sig, gsl_matrix *pred,
const size_t &iCl,
const gsl_rng *r);
1334 MVnormBeta(gsl_vector *b,
const gsl_matrix *Sig, gsl_matrix *pred,
const size_t &iCl,
const gsl_rng *r,
const size_t &
up);
1349 MVnormBeta(
const gsl_matrix *resp, gsl_matrix *pred,
const size_t &iCl,
const gsl_matrix *Sig,
const gsl_rng *r, gsl_matrix *bet,
const size_t &iRw);
1365 MVnormBeta(
const gsl_matrix *resp, gsl_matrix *pred,
const size_t &iCl,
const gsl_matrix *Sig,
const gsl_rng *r,
const size_t &
up, gsl_matrix *bet,
const size_t &iRw);
1380 MVnormBeta(
const Grp &resp, gsl_matrix *pred,
const size_t &iCl,
const gsl_matrix *Sig,
const gsl_rng *r, gsl_matrix *bet,
const size_t &iRw);
1396 MVnormBeta(
const Grp &resp, gsl_matrix *pred,
const size_t &iCl,
const gsl_matrix *Sig,
const gsl_rng *r,
const size_t &
up, gsl_matrix *bet,
const size_t &iRw);
1408 MVnormBeta(gsl_matrix *pred,
const size_t &iCl, gsl_matrix *bet,
const size_t &iRw);
1421 MVnormBeta(gsl_matrix *pred,
const size_t &iCl,
const size_t &
up, gsl_matrix *bet,
const size_t &iRw);
1442 virtual void update(
const Grp &dat,
const SigmaI &SigIb,
const gsl_rng *r);
1443 virtual void update(
const Grp &dat,
const Qgrp &q,
const SigmaI &SigIb,
const gsl_rng *r);
1446 virtual void update(
const Grp &dat,
const SigmaI &SigIb,
const double &qPr,
const SigmaI &SigIp,
const gsl_rng *r);
1448 virtual void update(
const Grp &dat,
const Qgrp &q,
const SigmaI &SigIb,
const double &qPr,
const SigmaI &SigIp,
const gsl_rng *r);
1451 virtual void update(
const Grp &dat,
const SigmaI &SigIb,
const Grp &muPr,
const double &qPr,
const SigmaI &SigIp,
const gsl_rng *r);
1453 virtual void update(
const Grp &dat,
const Qgrp &q,
const SigmaI &SigIb,
const Grp &muPr,
const double &qPr,
const SigmaI &SigIp,
const gsl_rng *r);
1491 MVnormBetaFt(gsl_vector *b,
const gsl_vector *sd, gsl_matrix *pred,
const size_t &iCl, gsl_matrix *allFt,
const size_t &begRw,
const gsl_rng *r) :
MVnormBeta(b, sd, pred, iCl, r) {
_fitted = gsl_matrix_submatrix(allFt, begRw, 0, pred->size1,
_d); };
1507 MVnormBetaFt(gsl_vector *b,
const gsl_vector *sd, gsl_matrix *pred,
const size_t &iCl, gsl_matrix *allFt,
const size_t &begRw,
const gsl_rng *r,
const size_t &
up) :
MVnormBeta(b, sd, pred, iCl, r,
up) {
_fitted = gsl_matrix_submatrix(allFt, begRw, 0, pred->size1,
_d); };
1523 MVnormBetaFt(gsl_vector *b,
const gsl_matrix *Sig, gsl_matrix *pred,
const size_t &iCl, gsl_matrix *allFt,
const size_t &begRw,
const gsl_rng *r) :
MVnormBeta(b, Sig, pred, iCl, r) {
_fitted = gsl_matrix_submatrix(allFt, begRw, 0, pred->size1,
_d); };
1539 MVnormBetaFt(gsl_vector *b,
const gsl_matrix *Sig, gsl_matrix *pred,
const size_t &iCl, gsl_matrix *allFt,
const size_t &begRw,
const gsl_rng *r,
const size_t &
up) :
MVnormBeta(b, Sig, pred, iCl, r,
up) {
_fitted = gsl_matrix_submatrix(allFt, begRw, 0, pred->size1,
_d); };
1557 MVnormBetaFt(
const gsl_matrix *resp, gsl_matrix *pred,
const size_t &iCl, gsl_matrix *allFt,
const size_t &begRw,
const gsl_matrix *Sig,
const gsl_rng *r, gsl_matrix *bet,
const size_t &iRw) :
MVnormBeta(resp, pred, iCl, Sig, r, bet, iRw) {
_fitted = gsl_matrix_submatrix(allFt, begRw, 0, pred->size1,
_d); };
1575 MVnormBetaFt(
const gsl_matrix *resp, gsl_matrix *pred,
const size_t &iCl, gsl_matrix *allFt,
const size_t &begRw,
const gsl_matrix *Sig,
const gsl_rng *r,
const size_t &
up, gsl_matrix *bet,
const size_t &iRw) :
MVnormBeta(resp, pred, iCl, Sig, r,
up, bet, iRw) {
_fitted = gsl_matrix_submatrix(allFt, begRw, 0, pred->size1,
_d); };
1592 MVnormBetaFt(
const gsl_matrix *resp, gsl_matrix *pred,
const size_t &iCl, vector<double> &eaFt,
const gsl_matrix *Sig,
const gsl_rng *r, gsl_matrix *bet,
const size_t &iRw) :
MVnormBeta(resp, pred, iCl, Sig, r, bet, iRw) {
_fitted = gsl_matrix_view_array(eaFt.data(), pred->size1,
_d); };
1609 MVnormBetaFt(
const gsl_matrix *resp, gsl_matrix *pred,
const size_t &iCl, vector<double> &eaFt,
const gsl_matrix *Sig,
const gsl_rng *r,
const size_t &
up, gsl_matrix *bet,
const size_t &iRw) :
MVnormBeta(resp, pred, iCl, Sig, r,
up, bet, iRw) {
_fitted = gsl_matrix_view_array(eaFt.data(), pred->size1,
_d); };
1627 MVnormBetaFt(
const Grp &resp, gsl_matrix *pred,
const size_t &iCl, gsl_matrix *allFt,
const size_t &begRw,
const gsl_matrix *Sig,
const gsl_rng *r, gsl_matrix *bet,
const size_t &iRw) :
MVnormBeta(resp, pred, iCl, Sig, r, bet, iRw) {
_fitted = gsl_matrix_submatrix(allFt, begRw, 0, pred->size1,
_d); };
1645 MVnormBetaFt(
const Grp &resp, gsl_matrix *pred,
const size_t &iCl, gsl_matrix *allFt,
const size_t &begRw,
const gsl_matrix *Sig,
const gsl_rng *r,
const size_t &
up, gsl_matrix *bet,
const size_t &iRw) :
MVnormBeta(resp, pred, iCl, Sig, r,
up, bet, iRw) {
_fitted = gsl_matrix_submatrix(allFt, begRw, 0, pred->size1,
_d); };
1662 MVnormBetaFt(
const Grp &resp, gsl_matrix *pred,
const size_t &iCl, vector<double> &eaFt,
const gsl_matrix *Sig,
const gsl_rng *r, gsl_matrix *bet,
const size_t &iRw) :
MVnormBeta(resp, pred, iCl, Sig, r, bet, iRw) {
_fitted = gsl_matrix_view_array(eaFt.data(), pred->size1,
_d); };
1679 MVnormBetaFt(
const Grp &resp, gsl_matrix *pred,
const size_t &iCl, vector<double> &eaFt,
const gsl_matrix *Sig,
const gsl_rng *r,
const size_t &
up, gsl_matrix *bet,
const size_t &iRw) :
MVnormBeta(resp, pred, iCl, Sig, r,
up, bet, iRw) {
_fitted = gsl_matrix_view_array(eaFt.data(), pred->size1,
_d); };
1693 MVnormBetaFt(gsl_matrix *pred,
const size_t &iCl, vector<double> &eaFt, gsl_matrix *bet,
const size_t &iRw) :
MVnormBeta(pred, iCl, bet, iRw) {
_fitted = gsl_matrix_view_array(eaFt.data(), pred->size1,
_d); };
1707 MVnormBetaFt(gsl_matrix *pred,
const size_t &iCl, vector<double> &eaFt,
const size_t &
up, gsl_matrix *bet,
const size_t &iRw) :
MVnormBeta(pred, iCl,
up, bet, iRw) {
_fitted = gsl_matrix_view_array(eaFt.data(), pred->size1,
_d); };
1736 void update(
const Grp &resp,
const SigmaI &SigIb,
const double &qPr,
const SigmaI &SigIp,
const gsl_rng *r);
1740 void update(
const Grp &resp,
const Qgrp &q,
const SigmaI &SigIb,
const double &qPr,
const SigmaI &SigIp,
const gsl_rng *r);
1745 void update(
const Grp &resp,
const SigmaI &SigIb,
const Grp &muPr,
const double &qPr,
const SigmaI &SigIp,
const gsl_rng *r);
1749 void update(
const Grp &resp,
const Qgrp &q,
const SigmaI &SigIb,
const Grp &muPr,
const double &qPr,
const SigmaI &SigIp,
const gsl_rng *r);
1798 MVnormMuBlk(gsl_matrix *mn,
const size_t &iRw,
const vector<size_t> &blkStart,
const size_t &
up);
1812 MVnormMuBlk(gsl_matrix *mn,
const size_t &iRw,
const gsl_vector *sd,
const gsl_rng *r,
const vector<size_t> &blkStart,
const vector< vector<size_t> > &eachLL,
const size_t &
up);
1823 void update(
const Grp &dat,
const SigmaI &SigIm,
const double &qPr,
const SigmaI &SigIp,
const gsl_rng *r);
1825 void update(
const Grp &dat,
const Qgrp &q,
const SigmaI &SigIm,
const double &qPr,
const SigmaI &SigIp,
const gsl_rng *r);
1828 void update(
const Grp &dat,
const SigmaI &SigIm,
const Grp &muPr,
const double &qPr,
const SigmaI &SigIp,
const gsl_rng *r);
1830 void update(
const Grp &dat,
const Qgrp &q,
const SigmaI &SigIm,
const Grp &muPr,
const double &qPr,
const SigmaI &SigIp,
const gsl_rng *r);
1857 vector< gsl_vector_view >
_X;
1894 MVnormBetaBlk(
const Grp &resp, gsl_matrix *pred,
const vector<size_t> &iCl,
const gsl_matrix *Sig,
const vector<size_t> &blkStart,
const gsl_rng *r, gsl_matrix *bet,
const size_t &iRw);
1910 MVnormBetaBlk(
const Grp &resp, gsl_matrix *pred,
const vector<size_t> &iCl,
const gsl_matrix *Sig,
const vector<size_t> &blkStart,
const gsl_rng *r,
const size_t &
up, gsl_matrix *bet,
const size_t &iRw);
1925 MVnormBetaBlk(
const gsl_matrix *resp, gsl_matrix *pred,
const vector<size_t> &iCl,
const gsl_matrix *Sig,
const vector<size_t> &blkStart,
const gsl_rng *r, gsl_matrix *bet,
const size_t &iRw);
1941 MVnormBetaBlk(
const gsl_matrix *resp, gsl_matrix *pred,
const vector<size_t> &iCl,
const gsl_matrix *Sig,
const vector<size_t> &blkStart,
const gsl_rng *r,
const size_t &
up, gsl_matrix *bet,
const size_t &iRw);
1948 virtual void update(
const Grp &dat,
const SigmaI &SigIb,
const gsl_rng *r);
1949 virtual void update(
const Grp &dat,
const Qgrp &q,
const SigmaI &SigIb,
const gsl_rng *r);
1952 virtual void update(
const Grp &dat,
const SigmaI &SigIb,
const double &qPr,
const SigmaI &SigIp,
const gsl_rng *r);
1954 virtual void update(
const Grp &dat,
const Qgrp &q,
const SigmaI &SigIb,
const double &qPr,
const SigmaI &SigIp,
const gsl_rng *r);
1957 virtual void update(
const Grp &dat,
const SigmaI &SigIb,
const Grp &muPr,
const double &qPr,
const SigmaI &SigIp,
const gsl_rng *r);
1959 virtual void update(
const Grp &dat,
const Qgrp &q,
const SigmaI &SigIb,
const Grp &muPr,
const double &qPr,
const SigmaI &SigIp,
const gsl_rng *r);
1999 MVnormBetaFtBlk(
const Grp &resp, gsl_matrix *pred, vector<double> &eaFt,
const vector<size_t> &iCl,
const gsl_matrix *Sig,
const vector<size_t> &blkStart,
const gsl_rng *r, gsl_matrix *bet,
const size_t &iRw) :
MVnormBetaBlk(resp, pred, iCl, Sig, blkStart, r, bet, iRw) {
_fitted = gsl_matrix_view_array(eaFt.data(), pred->size1,
_d);};
2016 MVnormBetaFtBlk(
const Grp &resp, gsl_matrix *pred, vector<double> &eaFt,
const vector<size_t> &iCl,
const gsl_matrix *Sig,
const vector<size_t> &blkStart,
const gsl_rng *r,
const size_t &
up, gsl_matrix *bet,
const size_t &iRw) :
MVnormBetaBlk(resp, pred, iCl, Sig, blkStart, r,
up, bet, iRw) {
_fitted = gsl_matrix_view_array(eaFt.data(), pred->size1,
_d);};
2032 MVnormBetaFtBlk(
const gsl_matrix *resp, gsl_matrix *pred, vector<double> &eaFt,
const vector<size_t> &iCl,
const gsl_matrix *Sig,
const vector<size_t> &blkStart,
const gsl_rng *r, gsl_matrix *bet,
const size_t &iRw) :
MVnormBetaBlk(resp, pred, iCl, Sig, blkStart, r, bet, iRw) {
_fitted = gsl_matrix_view_array(eaFt.data(), pred->size1,
_d);};
2049 MVnormBetaFtBlk(
const gsl_matrix *resp, gsl_matrix *pred, vector<double> &eaFt,
const vector<size_t> &iCl,
const gsl_matrix *Sig,
const vector<size_t> &blkStart,
const gsl_rng *r,
const size_t &
up, gsl_matrix *bet,
const size_t &iRw) :
MVnormBetaBlk(resp, pred, iCl, Sig, blkStart, r,
up, bet, iRw) {
_fitted = gsl_matrix_view_array(eaFt.data(), pred->size1,
_d);};
2058 void update(
const Grp &dat,
const SigmaI &SigIb,
const double &qPr,
const SigmaI &SigIp,
const gsl_rng *r);
2060 void update(
const Grp &dat,
const Qgrp &q,
const SigmaI &SigIb,
const double &qPr,
const SigmaI &SigIp,
const gsl_rng *r);
2063 void update(
const Grp &dat,
const SigmaI &SigIb,
const Grp &muPr,
const double &qPr,
const SigmaI &SigIp,
const gsl_rng *r);
2065 void update(
const Grp &dat,
const Qgrp &q,
const SigmaI &SigIb,
const Grp &muPr,
const double &qPr,
const SigmaI &SigIp,
const gsl_rng *r);
2123 RanIndex(
const gsl_vector_int *lInd,
const size_t &Ntot,
const size_t &Nup);
2138 RanIndex(
const size_t &Ntot,
const size_t &Nup);
2148 RanIndex(
const size_t &Ntot,
const size_t &Nup,
const string &fileNam);
2158 RanIndex(
const size_t &Ntot,
const size_t &Nup, FILE *fileStr);
2259 virtual const vector<double>
props()
const;
2269 virtual void init(
const vector< vector<size_t> > &idx,
const vector< vector<size_t> > &rLD);
2309 void update(
const Grp &theta,
const Grp &mu,
const vector<SigmaI> &SigI,
const MixP &p);
2434 size_t _proposal(
const size_t &Ntot,
const int &Nmn,
const gsl_rng *r);
2444 RanIndexVS(
const size_t &Ntot,
const string &outFlNam,
MixP &pr);
2450 RanIndexVS(
const size_t &Ntot,
const string &outFlNam);
2455 void props(vector<double> &prp)
const;
2491 void init(
const vector< vector<size_t> > &idx,
const vector< vector<size_t> > &rLD);
2516 gsl_matrix *_SigIpr;
2521 vector<vector<double> > *_fitEach;
2541 Apex(
const size_t &d, vector<vector <double> > &fE);
2550 Apex(
const double &dV,
const size_t &d, vector<vector <double> > &fE);
2558 Apex(
const SigmaI &SigI, vector<vector <double> > &fE);
2578 const gsl_matrix *
getMat()
const{
return _Amat; };
2586 void setPr(
const double &pr);
2888 virtual void save();
2895 virtual void save(
const string &outFlNam);
2905 virtual void save(
const string &outMuFlNam,
const string &outSigFlNam,
const SigmaI &SigI);
3092 MuGrp(
const string &datFlNam,
RanIndex &up,
const size_t &d);
3160 MuGrp(
const gsl_matrix *dat);
3333 void save(
const string &outFlNam);
3390 MuGrpMiss(
const string &datFlNam,
const string &misMatFlNam,
const string &misVecFlNam,
RanIndex &up,
const size_t &d);
3434 size_t nMis()
const{
return _misInd.size();};
3435 size_t nMis(){
return _misInd.size();};
3475 MuGrpEE(
const string &datFlNam,
const string &varFlNam,
const string &indFlNam,
RanIndex &up,
const size_t &d);
3486 MuGrpEE(
const string &datFlNam,
const string &varFlNam,
const vector<size_t> &varInd,
RanIndex &up,
const size_t &d);
3567 MuGrpEEmiss(
const string &datFlNam,
const string &varFlNam,
const string &indFlNam,
const string &misMatFlNam,
const string &misVecFlNam,
RanIndex &up,
const size_t &d);
3580 MuGrpEEmiss(
const string &datFlNam,
const string &varFlNam,
const vector<size_t> &varInd,
const string &misMatFlNam,
const string &misVecFlNam,
RanIndex &up,
const size_t &d);
3655 void _rankPred(
const gsl_matrix *y,
const SigmaI &SigI, gsl_vector *XtX, gsl_permutation *prm);
3666 void _rankPred(
const gsl_matrix *y,
const SigmaI &SigI,
const double &absLab, gsl_vector *XtX, gsl_permutation *prm);
3682 void _ldToss(
const gsl_vector *var,
const gsl_permutation *prm,
const double &rSqMax,
const size_t &Npck, vector< vector<size_t> > &idx, vector< vector<size_t> > &rLd, gsl_matrix *Xpck);
3703 virtual double _MGkernel(
const Grp &dat,
const SigmaI &SigI,
const size_t &prInd)
const;
3717 BetaGrpFt(
const Grp &rsp,
const string &predFlNam,
const size_t &Npred,
const int &nThr);
3728 BetaGrpFt(
const Grp &rsp,
const string &predFlNam,
const size_t &Npred,
RanIndex &up,
const int &nThr);
3753 BetaGrpFt(
const Grp &rsp,
const string &predFlNam,
const size_t &Npred,
const string &outFlNam,
const int &nThr);
3765 BetaGrpFt(
const Grp &rsp,
const string &predFlNam,
const size_t &Npred,
RanIndex &up,
const string &outFlNam,
const int &nThr);
3779 BetaGrpFt(
const Grp &rsp,
const string &predFlNam,
const size_t &Npred,
RanIndex &low,
RanIndex &up,
const string &outFlNam,
const int &nThr);
3792 BetaGrpFt(
const Grp &rsp,
const string &predFlNam,
const size_t &Npred,
const double &absLab,
const int &nThr);
3804 BetaGrpFt(
const Grp &rsp,
const string &predFlNam,
const size_t &Npred,
const double &absLab,
RanIndex &up,
const int &nThr);
3818 BetaGrpFt(
const Grp &rsp,
const string &predFlNam,
const size_t &Npred,
const double &absLab,
RanIndex &low,
RanIndex &up,
const int &nThr);
3831 BetaGrpFt(
const Grp &rsp,
const string &predFlNam,
const size_t &Npred,
const double &absLab,
const string &outFlNam,
const int &nThr);
3844 BetaGrpFt(
const Grp &rsp,
const string &predFlNam,
const size_t &Npred,
const double &absLab,
RanIndex &up,
const string &outFlNam,
const int &nThr);
3859 BetaGrpFt(
const Grp &rsp,
const string &predFlNam,
const size_t &Npred,
const double &absLab,
RanIndex &low,
RanIndex &up,
const string &outFlNam,
const int &nThr);
3880 BetaGrpFt(
const Grp &rsp,
const SigmaI &SigI,
const string &predFlNam,
const size_t &Npred,
const double &Nmul,
const double &rSqMax,
RanIndex &up,
const string &outFlNam,
const int &nThr);
3901 BetaGrpFt(
const Grp &rsp,
const SigmaI &SigI,
const string &predFlNam,
const size_t &Npred,
const double &Nmul,
const double &rSqMax,
RanIndex &low,
RanIndex &up,
const string &outFlNam,
const int &nThr);
3922 BetaGrpFt(
const Grp &rsp,
const SigmaI &SigI,
const string &predFlNam,
const size_t &Npred,
const double &Nmul,
const double &rSqMax,
const double &absLab,
RanIndex &up,
const string &outFlNam,
const int &nThr);
3944 BetaGrpFt(
const Grp &rsp,
const SigmaI &SigI,
const string &predFlNam,
const size_t &Npred,
const double &Nmul,
const double &rSqMax,
const double &absLab,
RanIndex &low,
RanIndex &up,
const string &outFlNam,
const int &nThr);
4083 BetaGrpPEX(
const Grp &rsp,
const string &predFlNam,
const size_t &Npred,
const double &Spr,
RanIndex &low,
RanIndex &up,
const int &nThr) :
BetaGrpFt(rsp, predFlNam, Npred, low, up, nThr) {
_finishConstruct(Spr); };
4096 BetaGrpPEX(
const Grp &rsp,
const string &predFlNam,
const size_t &Npred,
const double &Spr,
RanIndex &up,
const string &outFlNam,
const int &nThr) :
BetaGrpFt(rsp, predFlNam, Npred, up, outFlNam, nThr) {
_finishConstruct(Spr); };
4111 BetaGrpPEX(
const Grp &rsp,
const string &predFlNam,
const size_t &Npred,
const double &Spr,
RanIndex &low,
RanIndex &up,
const string &outFlNam,
const int &nThr) :
BetaGrpFt(rsp, predFlNam, Npred, low, up, outFlNam, nThr) {
_finishConstruct(Spr); };
4125 BetaGrpPEX(
const Grp &rsp,
const string &predFlNam,
const size_t &Npred,
const double &Spr,
const double &absLab,
RanIndex &up,
const int &nThr) :
BetaGrpFt(rsp, predFlNam, Npred, absLab, up, nThr) {
_finishConstruct(Spr); };
4140 BetaGrpPEX(
const Grp &rsp,
const string &predFlNam,
const size_t &Npred,
const double &Spr,
const double &absLab,
RanIndex &low,
RanIndex &up,
const int &nThr) :
BetaGrpFt(rsp, predFlNam, Npred, absLab, low, up, nThr) {
_finishConstruct(Spr); };
4154 BetaGrpPEX(
const Grp &rsp,
const string &predFlNam,
const size_t &Npred,
const double &Spr,
const double &absLab,
RanIndex &up,
const string &outFlNam,
const int &nThr) :
BetaGrpFt(rsp, predFlNam, Npred, absLab, up, outFlNam, nThr) {
_finishConstruct(Spr); };
4170 BetaGrpPEX(
const Grp &rsp,
const string &predFlNam,
const size_t &Npred,
const double &Spr,
const double &absLab,
RanIndex &low,
RanIndex &up,
const string &outFlNam,
const int &nThr) :
BetaGrpFt(rsp, predFlNam, Npred, absLab, low, up, outFlNam, nThr) {
_finishConstruct(Spr); };
4192 BetaGrpPEX(
const Grp &rsp,
const SigmaI &SigI,
const string &predFlNam,
const size_t &Npred,
const double &Spr,
const double &Nmul,
const double &rSqMax,
RanIndex &up,
const string &outFlNam,
const int &nThr) :
BetaGrpFt(rsp, SigI, predFlNam, Npred, Nmul, rSqMax, up, outFlNam, nThr) {
_finishConstruct(Spr); };
4214 BetaGrpPEX(
const Grp &rsp,
const SigmaI &SigI,
const string &predFlNam,
const size_t &Npred,
const double &Spr,
const double &Nmul,
const double &rSqMax,
RanIndex &low,
RanIndex &up,
const string &outFlNam,
const int &nThr) :
BetaGrpFt(rsp, SigI, predFlNam, Npred, Nmul, rSqMax, low, up, outFlNam, nThr) {
_finishConstruct(Spr); };
4236 BetaGrpPEX(
const Grp &rsp,
const SigmaI &SigI,
const string &predFlNam,
const size_t &Npred,
const double &Spr,
const double &Nmul,
const double &rSqMax,
const double &absLab,
RanIndex &up,
const string &outFlNam,
const int &nThr) :
BetaGrpFt(rsp, SigI, predFlNam, Npred, Nmul, rSqMax, absLab, up, outFlNam, nThr) {
_finishConstruct(Spr); };
4259 BetaGrpPEX(
const Grp &rsp,
const SigmaI &SigI,
const string &predFlNam,
const size_t &Npred,
const double &Spr,
const double &Nmul,
const double &rSqMax,
const double &absLab,
RanIndex &low,
RanIndex &up,
const string &outFlNam,
const int &nThr) :
BetaGrpFt(rsp, SigI, predFlNam, Npred, Nmul, rSqMax, absLab, low, up, outFlNam, nThr) {
_finishConstruct(Spr); };
4273 virtual void save();
4280 virtual void save(
const string &outFlNam);
4321 BetaGrpPC(
const Grp &rsp,
const string &predFlNam,
const string &evFlNam,
const size_t &Npred,
RanIndex &up,
const int &nThr);
4335 BetaGrpPC(
const Grp &rsp,
const string &predFlNam,
const string &evFlNam,
const size_t &Npred,
RanIndex &low,
RanIndex &up,
const int &nThr);
4350 BetaGrpPC(
const Grp &rsp,
const string &predFlNam,
const string &evFlNam,
const size_t &Npred,
RanIndex &up,
const string &outFlNam,
const int &nThr);
4365 BetaGrpPC(
const Grp &rsp,
const string &predFlNam,
const string &evFlNam,
const size_t &Npred,
RanIndex &low,
RanIndex &up,
const string &outFlNam,
const int &nThr);
4408 BetaGrpPCpex(
const Grp &rsp,
const string &predFlNam,
const string &evFlNam,
const size_t &Npred,
const double &Spr,
RanIndex &up,
const int &nThr) :
BetaGrpFt(),
BetaGrpPC(rsp, predFlNam, evFlNam, Npred, up, nThr),
BetaGrpPEX(Spr) {};
4423 BetaGrpPCpex(
const Grp &rsp,
const string &predFlNam,
const string &evFlNam,
const size_t &Npred,
const double &Spr,
RanIndex &low,
RanIndex &up,
const int &nThr) :
BetaGrpFt(),
BetaGrpPC(rsp, predFlNam, evFlNam, Npred, low, up, nThr),
BetaGrpPEX(Spr) {};
4439 BetaGrpPCpex(
const Grp &rsp,
const string &predFlNam,
const string &evFlNam,
const size_t &Npred,
const double &Spr,
RanIndex &up,
const string &outFlNam,
const int &nThr) :
BetaGrpFt(),
BetaGrpPC(rsp, predFlNam, evFlNam, Npred, up, outFlNam, nThr),
BetaGrpPEX(Spr) {};
4455 BetaGrpPCpex(
const Grp &rsp,
const string &predFlNam,
const string &evFlNam,
const size_t &Npred,
const double &Spr,
RanIndex &low,
RanIndex &up,
const string &outFlNam,
const int &nThr) :
BetaGrpFt(),
BetaGrpPC(rsp, predFlNam, evFlNam, Npred, low, up, outFlNam, nThr),
BetaGrpPEX(Spr) {};
4478 void update(
const Grp &dat,
const Qgrp &q,
const SigmaI &SigIm,
const Grp &muPr,
const Qgrp &qPr,
const SigmaI &SigIp){
BetaGrpPEX::update(dat, q, SigIm, muPr, qPr, SigIp); };
4541 BetaGrpSnp(
const string &predFlNam,
const string &outFlNam,
const size_t &Ndat,
const size_t &Npred,
const size_t &d,
const int &Nthr);
4554 BetaGrpSnp(
const string &predFlNam,
const string &outFlNam,
RanIndex &low,
const size_t &Npred,
const size_t &d,
const int &Nthr);
4568 BetaGrpSnp(
const string &predFlNam,
const string &outFlNam,
const size_t &Ndat,
const size_t &Npred,
const size_t &d,
const int &Nthr,
const double &prVar);
4582 BetaGrpSnp(
const string &predFlNam,
const string &outFlNam,
RanIndex &low,
const size_t &Npred,
const size_t &d,
const int &Nthr,
const double &prVar);
4591 virtual void dump();
4650 BetaGrpSnpCV(
const string &predFlNam,
const string &outFlNam,
const size_t &Ndat,
const size_t &Npred,
const size_t &d,
const int &Nthr) :
BetaGrpSnp(predFlNam, outFlNam, Ndat, Npred, d, Nthr) {};
4663 BetaGrpSnpCV(
const string &predFlNam,
const string &outFlNam,
RanIndex &low,
const size_t &Npred,
const size_t &d,
const int &Nthr) :
BetaGrpSnp(predFlNam, outFlNam, low, Npred, d, Nthr) {};
4677 BetaGrpSnpCV(
const string &predFlNam,
const string &outFlNam,
const size_t &Ndat,
const size_t &Npred,
const size_t &d,
const int &Nthr,
const double &prVar) :
BetaGrpSnp(predFlNam, outFlNam, Ndat, Npred, d, Nthr, prVar) {};
4691 BetaGrpSnpCV(
const string &predFlNam,
const string &outFlNam,
RanIndex &low,
const size_t &Npred,
const size_t &d,
const int &Nthr,
const double &prVar) :
BetaGrpSnp(predFlNam, outFlNam, low, Npred, d, Nthr, prVar) {};
4737 BetaGrpPSR(
const string &predFlNam,
const string &outFlNam,
const size_t &Ndat,
const size_t &Npred,
const size_t &d,
const int &Nthr) :
BetaGrpSnp(predFlNam, outFlNam, Ndat, Npred, d, Nthr) {};
4750 BetaGrpPSR(
const string &predFlNam,
const string &outFlNam,
RanIndex &low,
const size_t &Npred,
const size_t &d,
const int &Nthr) :
BetaGrpSnp(predFlNam, outFlNam, low, Npred, d, Nthr) {};
4764 BetaGrpPSR(
const string &predFlNam,
const string &outFlNam,
const size_t &Ndat,
const size_t &Npred,
const size_t &d,
const int &Nthr,
const double &prVar) :
BetaGrpSnp(predFlNam, outFlNam, Ndat, Npred, d, Nthr, prVar) {};
4778 BetaGrpPSR(
const string &predFlNam,
const string &outFlNam,
RanIndex &low,
const size_t &Npred,
const size_t &d,
const int &Nthr,
const double &prVar) :
BetaGrpSnp(predFlNam, outFlNam, low, Npred, d, Nthr, prVar) {};
4866 BetaGrpSnpMiss(
const string &predFlNam,
const string &outFlNam,
const size_t &Ndat,
const size_t &Npred,
const size_t &d,
const int &Nthr,
const double &absLab);
4880 BetaGrpSnpMiss(
const string &predFlNam,
const string &outFlNam,
RanIndex &low,
const size_t &Npred,
const size_t &d,
const int &Nthr,
const double &absLab);
4895 BetaGrpSnpMiss(
const string &predFlNam,
const string &outFlNam,
const size_t &Ndat,
const size_t &Npred,
const size_t &d,
const int &Nthr,
const double &prVar,
const double &absLab);
4910 BetaGrpSnpMiss(
const string &predFlNam,
const string &outFlNam,
RanIndex &low,
const size_t &Npred,
const size_t &d,
const int &Nthr,
const double &prVar,
const double &absLab);
4931 virtual void dump();
4980 BetaGrpSnpMissCV(
const string &predFlNam,
const string &outFlNam,
const size_t &Ndat,
const size_t &Npred,
const size_t &d,
const int &Nthr,
const double &absLab) :
BetaGrpSnpMiss(predFlNam, outFlNam, Ndat, Npred, d, Nthr, absLab) {};
4994 BetaGrpSnpMissCV(
const string &predFlNam,
const string &outFlNam,
RanIndex &low,
const size_t &Npred,
const size_t &d,
const int &Nthr,
const double &absLab) :
BetaGrpSnpMiss(predFlNam, outFlNam, low, Npred, d, Nthr, absLab) {};
5009 BetaGrpSnpMissCV(
const string &predFlNam,
const string &outFlNam,
const size_t &Ndat,
const size_t &Npred,
const size_t &d,
const int &Nthr,
const double &prVar,
const double &absLab) :
BetaGrpSnpMiss(predFlNam, outFlNam, Ndat, Npred, d, Nthr, prVar, absLab) {};
5024 BetaGrpSnpMissCV(
const string &predFlNam,
const string &outFlNam,
RanIndex &low,
const size_t &Npred,
const size_t &d,
const int &Nthr,
const double &prVar,
const double &absLab) :
BetaGrpSnpMiss(predFlNam, outFlNam, low, Npred, d, Nthr, prVar, absLab) {};
5071 BetaGrpPSRmiss(
const string &predFlNam,
const string &outFlNam,
const size_t &Ndat,
const size_t &Npred,
const size_t &d,
const int &Nthr,
const double &absLab) :
BetaGrpSnpMiss(predFlNam, outFlNam, Ndat, Npred, d, Nthr, absLab) {};
5085 BetaGrpPSRmiss(
const string &predFlNam,
const string &outFlNam,
RanIndex &low,
const size_t &Npred,
const size_t &d,
const int &Nthr,
const double &absLab) :
BetaGrpSnpMiss(predFlNam, outFlNam, low, Npred, d, Nthr, absLab) {};
5100 BetaGrpPSRmiss(
const string &predFlNam,
const string &outFlNam,
const size_t &Ndat,
const size_t &Npred,
const size_t &d,
const int &Nthr,
const double &prVar,
const double &absLab) :
BetaGrpSnpMiss(predFlNam, outFlNam, Ndat, Npred, d, Nthr, prVar, absLab) {};
5115 BetaGrpPSRmiss(
const string &predFlNam,
const string &outFlNam,
RanIndex &low,
const size_t &Npred,
const size_t &d,
const int &Nthr,
const double &prVar,
const double &absLab) :
BetaGrpSnpMiss(predFlNam, outFlNam, low, Npred, d, Nthr, prVar, absLab) {};
5176 void _ldToss(
const gsl_vector *var,
const gsl_permutation *prm,
const double &rSqMax,
const size_t &Nsel,
const size_t &Npck, vector< vector<size_t> > &idx, vector< vector<size_t> > &rLd, gsl_matrix *Xpck);
5227 BetaGrpBVSR(
const Grp &y,
const SigmaI &SigI,
const string &predFlNam,
const double &Nmul,
const double &rSqMax,
RanIndex &up,
const string &outFlNam,
const int &nThr);
5243 BetaGrpBVSR(
const Grp &y,
const SigmaI &SigI,
const string &predFlNam,
const double &Nmul,
const double &rSqMax,
RanIndex &low,
RanIndex &up,
const string &outFlNam,
const int &nThr);
5259 BetaGrpBVSR(
const Grp &y,
const SigmaI &SigI,
const string &predFlNam,
const double &Nmul,
const double &rSqMax,
const double &absLab,
RanIndex &up,
const string &outFlNam,
const int &nThr);
5276 BetaGrpBVSR(
const Grp &y,
const SigmaI &SigI,
const string &predFlNam,
const double &Nmul,
const double &rSqMax,
const double &absLab,
RanIndex &low,
RanIndex &up,
const string &outFlNam,
const int &nThr);
5299 const gsl_matrix *
dMat()
const{
return _selB; };
5361 MuBlk(
const Grp &dat,
const string &lowIndFlName,
const size_t &Nval,
RanIndex &up,
const string &blkIndFileNam);
5374 MuBlk(
const Grp &dat,
const string &lowIndFlName,
const size_t &Nval,
RanIndex &up,
const string &outFlNam,
const string &blkIndFileNam);
5441 BetaBlk(
const Grp &dat,
const string &predFlName,
const size_t &Npred,
const string &blkIndFileNam,
const int &nThr);
5454 BetaBlk(
const Grp &dat,
const string &predFlName,
const size_t &Npred,
const string &outFlNam,
const string &blkIndFileNam,
const int &nThr);
5467 BetaBlk(
const Grp &dat,
const string &predFlName,
const size_t &Npred,
RanIndex &up,
const string &blkIndFileNam,
const int &nThr);
5481 BetaBlk(
const Grp &dat,
const string &predFlName,
const size_t &Npred,
RanIndex &up,
const string &outFlNam,
const string &blkIndFileNam,
const int &nThr);
5495 BetaBlk(
const Grp &dat,
const string &predFlName,
const size_t &Npred,
const double &absLab,
const string &blkIndFileNam,
const int &nThr);
5509 BetaBlk(
const Grp &dat,
const string &predFlName,
const size_t &Npred,
const double &absLab,
const string &outFlNam,
const string &blkIndFileNam,
const int &nThr);
5523 BetaBlk(
const Grp &dat,
const string &predFlName,
const size_t &Npred,
const double &absLab,
RanIndex &up,
const string &blkIndFileNam,
const int &nThr);
5538 BetaBlk(
const Grp &dat,
const string &predFlName,
const size_t &Npred,
const double &absLab,
RanIndex &up,
const string &outFlNam,
const string &blkIndFileNam,
const int &nThr);
5609 SigmaI(
const size_t &d,
const double &invVar);
5618 SigmaI(
const size_t &d,
const double &invVar,
const double &df);
5628 SigmaI(
const size_t &d,
const double &invVar,
const double &df,
const string &outFlNam);
5635 SigmaI(
const gsl_matrix *mat);
5647 SigmaI(
const gsl_matrix *S,
const size_t &d,
const size_t &df,
const gsl_matrix *LamPr,
const double &nu0);
5658 SigmaI(
const gsl_matrix *S,
const size_t &d,
const size_t &df,
const double &diagPr,
const double &nu0);
5668 SigmaI(
const Grp &dat,
const double &prDiag,
const double &nu0);
5678 SigmaI(
const Grp &dat,
const string &outFlNam,
const double &prDiag,
const double &nu0);
5740 virtual void save(
const char *how =
"a");
5746 virtual void save(
const string &fileNam,
const char *how =
"a");
5756 void save(
const string &fileNam,
const Apex &A,
const char *how =
"a");
5761 void save(FILE *fileStr) {gsl_matrix_fwrite(fileStr,
_mat); };
5818 SigmaIblk(
const size_t &d,
const double &invVar,
const double &df,
const string &blkIndFileNam);
5829 SigmaIblk(
const size_t &d,
const double &invVar,
const double &df,
const string &blkIndFileNam,
const string &outFlNam);
5839 SigmaIblk(
const Grp &dat,
const string &blkIndFileNam,
const double &prDiag,
const double &nu0);
5850 SigmaIblk(
const Grp &dat,
const string &blkIndFileNam,
const string &outFlNam,
const double &prDiag,
const double &nu0);
5894 SigmaIpex(
const size_t &d,
const double &invVar,
const double &df,
const string &outFlNam) :
_alpha(1.0),
SigmaI(d, invVar, df, outFlNam) {};
5913 SigmaIpex(
const Grp &dat,
const string &outFlNam,
const double &prDiag,
const double &nu0) :
_alpha(1.0),
SigmaI(dat, outFlNam, prDiag, nu0) {};
5924 void save(
const char *how =
"a");
5932 void save(
const string &fileNam,
const char *how =
"a");
5988 Qgrp(
const size_t &N);
5996 Qgrp(
const size_t &N,
const double &nu);
6005 Qgrp(
const size_t &N,
const double &nu,
const string &misVecFlNam);
6013 Qgrp(
const size_t &N,
const string &outFileNam);
6022 Qgrp(
const size_t &N,
const string &outFileNam,
const double &nu);
6032 Qgrp(
const size_t &N,
const string &outFileNam,
const double &nu,
const string &misVecFlNam);
6056 virtual double alpha()
const {
return 1.0; };
6080 void save(
const char *how =
"a");
6086 void save(
const string &fileNam,
const char *how =
"a");
6148 QgrpPEX(
const size_t &N,
const double &nu,
const string &misVecFlNam) :
_alpha(1.0),
Qgrp(N, nu, misVecFlNam) {};
6165 QgrpPEX(
const size_t &N,
const string &outFileNam,
const double &nu) :
_alpha(1.0),
Qgrp(N, outFileNam, nu) {};
6175 QgrpPEX(
const size_t &N,
const string &outFileNam,
const double &nu,
const string &misVecFlNam) :
_alpha(1.0),
Qgrp(N, outFileNam, nu, misVecFlNam) {};
6209 vector<double> _alpha;
6225 MixP(
const vector<double> &initP) : _p(initP), _alpha(initP.size(), 1.0) {};
6232 MixP(
const gsl_vector *initP);
6240 MixP(
const vector<double> &initP,
const double &a);
6248 MixP(
const gsl_vector *initP,
const double &a);
6257 MixP(
const vector<double> &initP,
const double *a,
const size_t &len);
6265 MixP(
const gsl_vector *initP,
const double *a);
6273 MixP(
const vector<double> &initP,
const vector<double> &a);
6281 MixP(
const gsl_vector *initP,
const vector<double> &a);
void update(const Grp &theta, const Grp &mu, const vector< SigmaI > &SigI, const MixP &p)
Update mixture model with multiple covariances.
Definition: MuGen.cpp:4185
MuGrpPEX()
Default constructor.
Definition: MuGen.cpp:6112
virtual void update(const Grp &, const SigmaI &, const Grp &, const SigmaI &)=0
Gaussian likelihood, non-zero mean Gaussian prior.
Regression with independent blocks of traits.
Definition: MuGen.h:5403
vector< gsl_matrix_view > _eachX
Predictor submatrices.
Definition: MuGen.h:5415
void setApr(const double &pr)
Set the inverse-prior for the redundant parameter matrix.
Definition: MuGen.h:3348
void _rankPred(const gsl_matrix *y, const SigmaI &SigI, gsl_vector *XtX, gsl_permutation *prm)
Rank predictors.
Definition: MuGen.cpp:8271
BetaGrpPEX(const Grp &rsp, const SigmaI &SigI, const string &predFlNam, const size_t &Npred, const double &Spr, const double &Nmul, const double &rSqMax, const double &absLab, RanIndex &up, const string &outFlNam, const int &nThr)
Selection constructor with missing predictor data.
Definition: MuGen.h:4236
BetaGrpPEX()
Default constructor.
Definition: MuGen.h:4057
MuGrpEE & operator=(const MuGrpEE &mG)
Assignment operator.
Definition: MuGen.cpp:6737
vector< size_t > _errInd
Trait index.
Definition: MuGen.h:3460
MVnormBetaFt(gsl_vector *b, const gsl_vector *sd, gsl_matrix *pred, const size_t &iCl, gsl_matrix *allFt, const size_t &begRw, const gsl_rng *r)
Univariate random constructor with vector.
Definition: MuGen.h:1491
string getOutFile() const
Access the output file.
Definition: MuGen.h:5766
~SigmaIblk()
Destructor.
Definition: MuGen.h:5853
void valSet(const size_t i, const double x)
Setting an element to a value.
Definition: MuGen.h:611
vector< bool > _rejectDrop
Reject a drop.
Definition: MuGen.h:2388
gsl_matrix * _mat
Inverse-covariance matrix.
Definition: MuGen.h:5567
virtual void update(const Grp &, const SigmaI &, const Qgrp &, const SigmaI &)=0
Gaussian likelihood, 0-mean Student- prior.
void _updateAfitted()
Calculate redundant parameter fitted values.
Definition: MuGen.cpp:8706
~Apex()
Destructor.
Definition: MuGen.cpp:4801
~BetaGrpSnp()
Destructor.
Definition: MuGen.cpp:9458
vector< size_t > & getIndVec()
Retrieve the index vector.
Definition: MuGen.h:2197
virtual double scalePar() const
Scale parameter.
Definition: MuGen.h:663
vector< list< size_t > > _missErrMat
Error index.
Definition: MuGen.h:3550
BetaGrpPEX(const Grp &rsp, const SigmaI &SigI, const string &predFlNam, const size_t &Npred, const double &Spr, const double &Nmul, const double &rSqMax, RanIndex &up, const string &outFlNam, const int &nThr)
Selection constructor.
Definition: MuGen.h:4192
gsl_matrix_view _tSAprod
Pre-computed auxiliary matrix.
Definition: MuGen.h:900
void meanImpute(gsl_matrix *inplace, const double &absLab)
Mean imputation without centering.
Definition: MuGen.cpp:231
MVnormBetaFt(const Grp &resp, gsl_matrix *pred, const size_t &iCl, gsl_matrix *allFt, const size_t &begRw, const gsl_matrix *Sig, const gsl_rng *r, const size_t &up, gsl_matrix *bet, const size_t &iRw)
Multivariate random constructor with Grp type response and prior index.
Definition: MuGen.h:1645
double alpha() const
Const access to .
Definition: MuGen.h:6183
MuGrp mean(RanIndex &grp)
Group mean.
Definition: MuGen.cpp:6327
BetaGrpSnpCV(const string &predFlNam, const string &outFlNam, const size_t &Ndat, const size_t &Npred, const size_t &d, const int &Nthr)
Constructor with no replication and -values.
Definition: MuGen.h:4650
Apex & getA()
Access the redundant parameter.
Definition: MuGen.h:3343
size_t len() const
Length of the location vector.
Definition: MuGen.h:624
virtual void update(const Grp &dat, const SigmaI &SigIb, const gsl_rng *r)
Gaussian likelihood.
Definition: MuGen.cpp:3274
SigmaI()
Default constructor.
Definition: MuGen.cpp:12867
const vector< size_t > getMisPhen() const
Indexes of missing values.
Definition: MuGen.h:1242
void update(const Grp &dat, const SigmaI &SigIb, const gsl_rng *r)
Gaussian likelihood.
Definition: MuGen.cpp:3623
gsl_vector_view _X
Predictor.
Definition: MuGen.h:975
MuGrpEEmiss & operator=(const MuGrpEEmiss &mG)
Assignment operator.
Definition: MuGen.cpp:6982
virtual void update(const Grp &, const SigmaI &)=0
Gaussian likelihood, improper prior.
QgrpPEX(const size_t &N, const string &outFileNam)
Deterministic size-only constructor with output file name.
Definition: MuGen.h:6156
virtual void update(const Grp &dat, const Grp &mu, const SigmaI &SigI)
Update with a mean.
Definition: MuGen.cpp:13768
void save()
Save the adjusted values.
Definition: MuGen.cpp:6281
double mhl(const gsl_vector *beta, const gsl_matrix *SigI)
Mahalanobis distance.
Definition: MuGen.cpp:130
vector< vector< size_t > > _relLD
Mapping selected to original predictors.
Definition: MuGen.h:2367
const gsl_matrix * fMat() const
Access to the expanded value matrix.
Definition: MuGen.h:5380
void _updateFitted()
Update fitted values.
Definition: MuGen.cpp:12830
MVnormBetaFtBlk(const Grp &resp, gsl_matrix *pred, vector< double > &eaFt, const vector< size_t > &iCl, const gsl_matrix *Sig, const vector< size_t > &blkStart, const gsl_rng *r, gsl_matrix *bet, const size_t &iRw)
Constructor with no prior index.
Definition: MuGen.h:1999
string _pepOutFlnam
PEP output file name.
Definition: MuGen.h:2421
virtual void update(const Grp &, const SigmaI &, const SigmaI &, const gsl_rng *)=0
Gaussian likelihood, Gaussian prior.
gsl_rng * _r
Pseudo-random number generator.
Definition: MuGen.h:5594
~MuBlk()
Destructor.
Definition: MuGen.h:5377
BVSR index class.
Definition: MuGen.h:2346
void save(const SigmaI &SigI)
Save adjusted values with the adjusted covariance matrix.
Definition: MuGen.h:4468
vector< size_t > _shortLevels
Blocks with few levels.
Definition: MuGen.h:5331
MVnormBetaFt(const Grp &resp, gsl_matrix *pred, const size_t &iCl, vector< double > &eaFt, const gsl_matrix *Sig, const gsl_rng *r, const size_t &up, gsl_matrix *bet, const size_t &iRw)
Multivariate random constructor with Grp type response and prior index.
Definition: MuGen.h:1679
BetaGrpPEX(const double &Spr)
Finishing constructor.
Definition: MuGen.h:4054
virtual void save()
Save adjusted values.
Definition: MuGen.cpp:8766
RanIndex * _lowLevel
Lower level index.
Definition: MuGen.h:2731
virtual void _updateFitted()
Update fitted values.
Definition: MuGen.cpp:8209
const size_t phenD() const
Get number of traits.
Definition: MuGen.h:2969
void _ldToss(const gsl_vector *var, const gsl_permutation *prm, const double &rSqMax, const size_t &Npck, vector< vector< size_t > > &idx, vector< vector< size_t > > &rLd, gsl_matrix *Xpck)
Testing candidates for correlation.
Definition: MuGen.cpp:8363
const MVnorm * operator[](const size_t i) const
Subscript operator.
Definition: MuGen.h:2991
Qgrp()
Default constructor.
Definition: MuGen.h:5981
~MuGrpMiss()
Destructor.
Definition: MuGen.h:3393
size_t _N
Length of the predictor.
Definition: MuGen.h:1265
friend MuGrp operator-(const Grp &m1, const Grp &m2)
Subtraction operator.
Definition: MuGen.cpp:5243
~SigmaIpex()
Destructor.
Definition: MuGen.h:5916
BetaGrpSnpMissCV(const string &predFlNam, const string &outFlNam, const size_t &Ndat, const size_t &Npred, const size_t &d, const int &Nthr, const double &absLab)
Constructor with no replication and -values.
Definition: MuGen.h:4980
void _ldToss(const gsl_vector *var, const gsl_permutation *prm, const double &rSqMax, const size_t &Nsel, const size_t &Npck, vector< vector< size_t > > &idx, vector< vector< size_t > > &rLd, gsl_matrix *Xpck)
Testing candidates for correlation.
Definition: MuGen.cpp:11293
size_t _Npred
Number of predictors (SNPs)
Definition: MuGen.h:4828
BetaGrpSnpCV()
Default constructor.
Definition: MuGen.h:4637
Data with measurement error.
Definition: MuGen.h:3444
size_t size()
Length of the weight vector.
Definition: MuGen.h:6074
virtual ~MuGrp()
Destructor.
Definition: MuGen.h:3180
double _n0
Prior degrees of freedom.
Definition: MuGen.h:5585
MVnormBetaFt(gsl_matrix *pred, const size_t &iCl, vector< double > &eaFt, gsl_matrix *bet, const size_t &iRw)
Deterministic constructor.
Definition: MuGen.h:1693
virtual void save(const SigmaI &SigI)
Save with inverse-covariance.
Definition: MuGen.h:2913
virtual ~MVnormMuPEX()
Destructor.
Definition: MuGen.h:950
string _mcmcPutFlNam
Accept/reject file name.
Definition: MuGen.h:2426
void update(const Grp &dat, const SigmaI &SigIm, const gsl_rng *r)
Gaussian likelihood.
Definition: MuGen.cpp:2664
BetaGrpPEX(const Grp &rsp, const string &predFlNam, const size_t &Npred, const double &Spr, RanIndex &up, const int &nThr)
Simple constructor with a prior index.
Definition: MuGen.h:4069
Generic regression.
Definition: MuGen.h:1250
double _numSaves
Number of saves.
Definition: MuGen.h:4516
vector< bool > _acceptSwap
Accept a swap.
Definition: MuGen.h:2406
const gsl_matrix * fMat() const
Access adjusted fitted value matrix.
Definition: MuGen.h:4464
MuGrpMiss & operator=(const MuGrpMiss &mG)
Assignment operator.
Definition: MuGen.cpp:6574
BetaGrpFt & operator=(const BetaGrpFt &mG)
Assignment operator.
Definition: MuGen.cpp:8166
virtual ~SigmaI()
Destructor.
Definition: MuGen.cpp:13088
virtual ~BetaGrpFt()
Destructor.
Definition: MuGen.cpp:8204
virtual size_t nMissP() const
Number of missing values.
Definition: MuGen.h:862
string _outFlNam
Name of the output file.
Definition: MuGen.h:2745
const gsl_vector * getVec() const
Access the location vector.
Definition: MuGen.h:618
void update(const Grp &dat, const SigmaI &SigIm, const SigmaI &SigIp)
Gaussian likelihood, 0-mean Gaussian prior.
Definition: MuGen.cpp:6345
~MVnormBetaPEX()
Destructor.
Definition: MuGen.h:1047
~BetaGrpSnpMiss()
Destructor.
Definition: MuGen.cpp:10096
const size_t * _upLevel
Pointer to a row index of the prior.
Definition: MuGen.h:1764
friend MuGrp operator-(const Grp &m1, const Grp &m2)
Subtraction operator.
Definition: MuGen.cpp:5243
Individual vector of regression coefficients with blocks of traits.
Definition: MuGen.h:1838
BetaGrpPEX(const Grp &rsp, const string &predFlNam, const size_t &Npred, const double &Spr, RanIndex &low, RanIndex &up, const string &outFlNam, const int &nThr)
Simple constructor with a prior index, replication and output file name.
Definition: MuGen.h:4111
virtual const gsl_matrix * fMat() const
Access adjusted fitted value matrix.
Definition: MuGen.h:4268
BetaGrpBVSR()
Default constructor.
Definition: MuGen.h:5212
BetaGrpPSR(const string &predFlNam, const string &outFlNam, RanIndex &low, const size_t &Npred, const size_t &d, const int &Nthr, const double &prVar)
Constructor with replication and ABF.
Definition: MuGen.h:4778
BetaGrpPSR(const string &predFlNam, const string &outFlNam, RanIndex &low, const size_t &Npred, const size_t &d, const int &Nthr)
Constructor with replication and -values.
Definition: MuGen.h:4750
BetaGrpPC()
Default constructor.
Definition: MuGen.h:4309
MuBlk()
Default constructor.
Definition: MuGen.h:5349
virtual void dump()
Dump results to the output file.
Definition: MuGen.cpp:9468
const size_t * up() const
Points to the prior.
Definition: MuGen.h:879
virtual void update(const Grp &, const SigmaI &, const double &, const SigmaI &, const gsl_rng *)=0
Gaussian likelihood, Student- prior.
size_t getNtot() const
Number of lower-level elements.
Definition: MuGen.h:2225
void center()
Center the value matrix.
Definition: MuGen.h:3044
BetaGrpPEX(const Grp &rsp, const string &predFlNam, const size_t &Npred, const double &Spr, const double &absLab, RanIndex &up, const int &nThr)
Missing data constructor with a prior index.
Definition: MuGen.h:4125
Apex _A
Redundant parameter matrix.
Definition: MuGen.h:3236
MVnormBetaFt & operator=(const MVnormBetaFt &)
Deterministic assignment operator.
Definition: MuGen.cpp:2284
BetaGrpPSR(const string &predFlNam, const string &outFlNam, const size_t &Ndat, const size_t &Npred, const size_t &d, const int &Nthr)
Constructor with no replication and -values.
Definition: MuGen.h:4737
double _numSaves
Number of calls to save()
Definition: MuGen.h:2419
void save()
Save adjusted values.
Definition: MuGen.h:4466
virtual const gsl_matrix * fMat() const
Access to the fitted value matrix.
Definition: MuGen.h:3969
double _priorVar
Prior variance.
Definition: MuGen.h:4845
gsl_matrix * _selB
Matrix of selected predictors.
Definition: MuGen.h:5152
int _nThr
Number of threads.
Definition: MuGen.h:3633
MVnormMu & operator=(const MVnormMu &)
Assignment operator.
Definition: MuGen.cpp:562
friend MuGrp operator+(const Grp &m1, const Grp &m2)
Addition operator.
Definition: MuGen.cpp:4978
gsl_matrix_view _fitted
Matrix of already fitted values.
Definition: MuGen.h:1471
virtual ~Qgrp()
Destructor.
Definition: MuGen.h:6035
void update(const Grp &y, const gsl_matrix *xi, const SigmaI &SigIm)
Unreplicated Gaussian update.
Definition: MuGen.cpp:4835
void srDetUpdate()
Update square-root of the determinant.
Definition: MuGen.cpp:13200
BetaGrpPCpex()
Default constructor.
Definition: MuGen.h:4395
gsl_matrix * _Ystore
Response storage.
Definition: MuGen.h:4506
const vector< size_t > * down() const
Points to the corresponding data.
Definition: MuGen.h:871
void update(const Grp &y, const SigmaI &SigIe, BetaGrpBVSR *theta, const SigmaI &SigIp)
Variable selection update.
Definition: MuGen.cpp:4462
virtual double _MGkernel(const Grp &dat, const SigmaI &SigI) const
Gaussian kernel.
Definition: MuGen.cpp:8431
void dump()
Save PEP to a file.
Definition: MuGen.cpp:4424
void update(const Grp &dat, const SigmaI &SigIm)
Gaussian likelihood, improper prior.
Definition: MuGen.cpp:8570
const size_t * _upLevel
Row index of the prior.
Definition: MuGen.h:1272
void colCenter(gsl_matrix *inplace)
Matrix centering in-place.
Definition: blupEMMAX.cpp:51
BetaGrpSnpMiss & operator=(const BetaGrpSnpMiss &mG)
Assignment operator.
Definition: MuGen.cpp:10077
Individual vector of means.
Definition: MuGen.h:673
MVnormBeta & operator=(const MVnormBeta &)
Deterministic assignement operator.
Definition: MuGen.cpp:1966
void update(const Grp &dat, const SigmaI &SigIm)
Response update function.
Definition: MuGen.cpp:10297
virtual void update(const Grp &, const Qgrp &, const SigmaI &, const Grp &, const SigmaI &)=0
Student- likelihood, non-zero mean Gaussian prior.
MVnormMuPEX & operator=(const MVnormMuPEX &mu)
Assignment operator.
Definition: MuGen.cpp:903
QgrpPEX(const size_t &N, const string &outFileNam, const double &nu)
Deterministic constructor with degrees of freedom and output file name.
Definition: MuGen.h:6165
vector< size_t > _blkStart
Block start indexes.
Definition: MuGen.h:5315
BetaGrpSnp()
Default constructor.
Definition: MuGen.cpp:9370
BetaGrpSnp & operator=(const BetaGrpSnp &mG)
Assignment operator.
Definition: MuGen.cpp:9438
string _outSigFlNam
Covariance output file name.
Definition: MuGen.h:3250
BetaGrpSnpMiss()
Default constructor.
Definition: MuGen.cpp:10021
~MVnormBetaFtBlk()
Destructor.
Definition: MuGen.h:2052
gsl_matrix * _fakeFmat
Matrix for addition operators.
Definition: MuGen.h:4500
double _alpha
The PEX parameter.
Definition: MuGen.h:5871
virtual void update(const Grp &, const Qgrp &, const SigmaI &, const Qgrp &, const SigmaI &)=0
Student- likelihood, 0-mean Student- prior.
size_t _proposal(const size_t &Ntot, const int &Nmn, const gsl_rng *r)
Rank proposal-generating function.
Definition: MuGen.cpp:4346
MixP & operator=(const MixP &)
Assignement operator.
Definition: MuGen.cpp:13932
const vector< size_t > * _lowLevel
Data indexes.
Definition: MuGen.h:681
BetaGrpPSR()
Default constructor.
Definition: MuGen.h:4724
void update(const Grp &dat, const SigmaI &SigIm)
Response update function.
Definition: MuGen.cpp:9615
vector< gsl_rng * > _rV
Vector of PNG pointers.
Definition: MuGen.h:2742
double _nu
Student- degrees of freedom.
Definition: MuGen.h:5966
virtual void update(const Grp &, const Qgrp &, const SigmaI &, const gsl_rng *)=0
Sudent- likelihood.
gsl_matrix_view _fitted
Matrix of fitted values.
Definition: MuGen.h:1975
BetaGrpPSR & operator=(const BetaGrpPSR &mG)
Assignment operator.
Definition: MuGen.cpp:9840
size_t _d
Length of the data vector.
Definition: MuGen.h:256
double operator[](const size_t i)
Subscript operator.
Definition: MuGen.h:6048
gsl_matrix * _tSigIAt
Scaled inverse-covariance.
Definition: MuGen.h:3234
virtual const vector< size_t > getMisPhen() const
Indexes of missing values.
Definition: MuGen.h:639
gsl_matrix * _fittedAll
Matrix of fitted values.
Definition: MuGen.h:3621
virtual MuGrp mean(RanIndex &grp)
Group mean.
Definition: MuGen.cpp:5606
virtual void update(const Grp &mu, const SigmaI &SigIm)
Standard Gaussian imputation.
Definition: MuGen.cpp:6600
virtual ~MVnormBetaBlk()
Destructor.
Definition: MuGen.h:1944
virtual void update(const Grp &dat, const SigmaI &SigIm, const SigmaI &SigIp)
Gaussian likelihood, 0-mean Gaussian prior.
Definition: MuGen.cpp:8821
virtual void save(const char *how="a")
Save to a stored file name.
Definition: MuGen.cpp:13217
BetaGrpSnpCV(const string &predFlNam, const string &outFlNam, RanIndex &low, const size_t &Npred, const size_t &d, const int &Nthr, const double &prVar)
Constructor with replication and ABF.
Definition: MuGen.h:4691
gsl_matrix * _expandedVM
Expanded _valueMat.
Definition: MuGen.h:5325
MuGrpPEX & operator=(const MuGrpPEX &mGp)
Assignment operator.
Definition: MuGen.cpp:6252
BetaGrpPSRmiss & operator=(const BetaGrpPSRmiss &mG)
Assignment operator.
Definition: MuGen.cpp:10564
MixP * _prior
Prior proportions.
Definition: MuGen.h:2375
BetaGrpSnpCV & operator=(const BetaGrpSnpCV &mG)
Assignment operator.
Definition: MuGen.cpp:9642
MuGrpEEmiss()
Default constructor.
Definition: MuGen.h:3554
void init(const vector< vector< size_t > > &idx, const vector< vector< size_t > > &rLD)
Complete initialization.
Definition: MuGen.cpp:4366
vector< gsl_matrix_view > _eachBlk
Inverse-covariance matrix submatrices.
Definition: MuGen.h:5799
Single-SNP regression with conditional variance and missing data.
Definition: MuGen.h:4961
Apex & operator=(const Apex &A)
Assignement constructor.
Definition: MuGen.cpp:4822
vector< gsl_vector_view > _X
Separate predictors.
Definition: MuGen.h:1857
MVnorm(const size_t &d)
Dimension-only constructor.
Definition: MuGen.h:269
gsl_matrix * _tSigIAt
Scaled inverse-covariance.
Definition: MuGen.h:4010
virtual void update(const Grp &, const SigmaI &, const Grp &, const SigmaI &, const gsl_rng *)=0
Gaussian likelihood, Gaussian prior.
size_t getNgrp() const
Number of upper-level elements.
Definition: MuGen.h:2242
MVnorm * operator[](const size_t i)
Subscript operator.
Definition: MuGen.h:3000
~BetaGrpPSRmiss()
Destructor.
Definition: MuGen.h:5118
Basic inverse-covariance.
Definition: MuGen.h:5561
void mhlSave(const string &outFlNam, const SigmaI SigI)
Save Mahalanobis distance.
Definition: MuGen.cpp:5592
Simple single-SNP regression class.
Definition: MuGen.h:4489
void save(const char *how="a")
Save to a stored file name.
Definition: MuGen.cpp:13734
gsl_vector_view _vec
Data vector.
Definition: MuGen.h:253
double _MGkernel(const Grp &dat, const SigmaI &SigI) const
Gaussian kernel.
Definition: MuGen.cpp:11365
string _inPredFl
Predictor (SNP) file name.
Definition: MuGen.h:4848
void printMat(const gsl_matrix *m)
Print matrix to screen.
Definition: MuGen.cpp:254
double scalePar() const
Scale parameter.
Definition: MuGen.h:1456
gsl_matrix * _valueMat
Value matrix.
Definition: MuGen.h:2725
virtual double alpha()
Access to .
Definition: MuGen.h:6063
void update(const Grp &dat, const Qgrp &q, const SigmaI &SigIm, const Grp &muPr, const SigmaI &SigIp)
Student- likelihood, non-zero mean Gaussian prior.
Definition: MuGen.h:4476
const vector< size_t > & operator[](const size_t i) const
Subscript operator.
Definition: MuGen.h:2171
const vector< MVnorm * > & dataVec() const
Get vector of row pointers.
Definition: MuGen.h:2944
virtual void update(const Grp &, const Qgrp &, const SigmaI &, const Grp &, const Qgrp &, const SigmaI &)=0
Student- likelihood, non-zero mean Student- prior.
virtual void dump()
Dump results to a file.
Definition: MuGen.h:2295
void update(const Grp &dat, const SigmaI &SigIm, const Grp &muPr, const Qgrp &qPr, const SigmaI &SigIp)
Gaussian likelihood, non-zero mean Student- prior.
Definition: MuGen.h:4477
gsl_matrix * _Xmat
SNP predictor matrix.
Definition: MuGen.h:4495
vector< gsl_matrix_view > _eachB
Regression coefficient submatrices.
Definition: MuGen.h:5420
Apex _A
Multiplicative redundant parameter.
Definition: MuGen.h:4012
BetaGrpPSRmiss(const string &predFlNam, const string &outFlNam, RanIndex &low, const size_t &Npred, const size_t &d, const int &Nthr, const double &prVar, const double &absLab)
Constructor with replication and ABF.
Definition: MuGen.h:5115
Apex * _A
Pointer to the redundant parameter.
Definition: MuGen.h:894
const size_t Ndata() const
Get number of rows.
Definition: MuGen.h:2964
const gsl_matrix * fMat() const
Access adjusted fitted value matrix.
Definition: MuGen.h:4609
vector< list< double > > _meanVal
Means for values with errors.
Definition: MuGen.h:3545
BetaGrpPC & operator=(const BetaGrpPC &mG)
Assignment operator.
Definition: MuGen.cpp:9326
void update(const Grp &dat, const Qgrp &q, const SigmaI &SigIm, const SigmaI &SigIp)
Student- likelihood, 0-mean Gaussian prior.
Definition: MuGen.h:4471
~MVnormMuMiss()
Destructor.
Definition: MuGen.h:1206
gsl_matrix * _fittedAllAdj
Adjusted fitted matrix.
Definition: MuGen.h:4024
double _srDet
Square root of the determinant.
Definition: MuGen.h:5577
gsl_matrix_view _fitted
Fitted values.
Definition: MuGen.h:989
void update(const Grp &resp, const SigmaI &SigIb, const gsl_rng *r)
Gaussian likelihood.
Definition: MuGen.cpp:2296
~BetaGrpBVSR()
Destructor.
Definition: MuGen.cpp:11259
friend MuGrp operator+(const Grp &m1, const Grp &m2)
Addition operator.
Definition: MuGen.cpp:4978
double _scale
Scale parameter.
Definition: MuGen.h:1263
void save(const Grp &y, const BetaGrpBVSR *theta, const SigmaI &SigIe)
Save PEP.
Definition: MuGen.cpp:4384
virtual void update(const Grp &dat)
Basic Gaussian update.
Definition: MuGen.cpp:13095
MVnormBetaFtBlk(const gsl_matrix *resp, gsl_matrix *pred, vector< double > &eaFt, const vector< size_t > &iCl, const gsl_matrix *Sig, const vector< size_t > &blkStart, const gsl_rng *r, gsl_matrix *bet, const size_t &iRw)
Constructor with no prior index.
Definition: MuGen.h:2032
const gsl_matrix * fMat() const
Access the adjusted value matrix.
Definition: MuGen.h:3321
Relationship matrix regression.
Definition: MuGen.h:4304
vector< double > _qVec
Vector of weights.
Definition: MuGen.h:5959
vector< bool > _rejectSwap
Reject a swap.
Definition: MuGen.h:2412
virtual ~BetaGrpPEX()
Destructor.
Definition: MuGen.cpp:8649
vector< vector< vector< size_t > > > _blkLow
Vector of low level indexes.
Definition: MuGen.h:5320
QgrpPEX(const size_t &N, const double &nu, const string &misVecFlNam)
Deterministic constructor with degrees of freedom and missing values.
Definition: MuGen.h:6148
double lnOddsRat(const Grp &y, const SigmaI &SigI, const size_t i) const
Log-odds ratio.
Definition: MuGen.cpp:8548
double density(const gsl_vector *theta, const SigmaI &SigI)
Multivariate Gaussian density.
Definition: MuGen.cpp:446
virtual void dump()
Dump results to the output file.
Definition: MuGen.cpp:10101
~RanIndexVS()
Destructor.
Definition: MuGen.h:2453
void update(const Grp &dat, const SigmaI &SigIm)
Gaussian likelihood, improper prior.
Definition: MuGen.cpp:11877
~BetaGrpSnpCV()
Destructor.
Definition: MuGen.h:4694
gsl_matrix * _Ystore
Response storage.
Definition: MuGen.h:4825
MVnormBeta()
Default constructor.
Definition: MuGen.cpp:1761
BetaGrpSnpCV(const string &predFlNam, const string &outFlNam, RanIndex &low, const size_t &Npred, const size_t &d, const int &Nthr)
Constructor with replication and -values.
Definition: MuGen.h:4663
void update(const Grp &dat, const Qgrp &q, const SigmaI &SigIm, const Qgrp &qPr, const SigmaI &SigIp)
Student- likelihood, 0-mean Student- prior.
Definition: MuGen.h:4473
MVnormBetaFtBlk()
Default constructor.
Definition: MuGen.h:1983
Base location parameter group class.
Definition: MuGen.h:2705
MVnormBetaBlk()
Default constructor.
Definition: MuGen.h:1879
SigmaIpex()
Default constructor.
Definition: MuGen.h:5875
Hierarchical mean.
Definition: MuGen.h:3053
size_t nMissP() const
Number of missing values.
Definition: MuGen.h:1234
void vecCenter(gsl_vector *inplace)
Vector centering in-place.
Definition: MuGen.cpp:221
double _numSaves
Number of saves.
Definition: MuGen.h:3639
virtual void update(const Grp &dat, const SigmaI &SigIm, const SigmaI &SigIp, const gsl_rng *r)
Gaussian likelihood, Gaussian prior.
Definition: MuGen.cpp:914
virtual const vector< size_t > * down() const
Points to the corresponding data.
Definition: MuGen.h:647
MuGrp operator-(const Grp &m1, const Grp &m2)
Subtraction operator.
Definition: MuGen.cpp:5243
Block-diagonal inverse-covariance.
Definition: MuGen.h:5788
Hierarchical mean with independent blocks of traits.
Definition: MuGen.h:5309
virtual ~MVnormBeta()
Destructor.
Definition: MuGen.cpp:1977
const size_t * _upLevel
Prior index.
Definition: MuGen.h:688
const gsl_matrix * getMat() const
Get redundant parameter matrix.
Definition: MuGen.h:2578
virtual void update(const Grp &, const SigmaI &, const gsl_rng *)=0
Gaussian likelihood.
vector< size_t > _blkStart
Block start indexes.
Definition: MuGen.h:5794
virtual ~RanIndex()
Destructor.
Definition: MuGen.h:2161
void save(const string &fileNam, const char *how="a")
Save function.
Definition: MuGen.cpp:471
MVnormBetaFt(const gsl_matrix *resp, gsl_matrix *pred, const size_t &iCl, vector< double > &eaFt, const gsl_matrix *Sig, const gsl_rng *r, gsl_matrix *bet, const size_t &iRw)
Multivariate random constructor with response matrix.
Definition: MuGen.h:1592
double _alpha
Redundant parameter .
Definition: MuGen.h:6120
Multiplicative redundant parameter.
Definition: MuGen.h:2505
~MuGrpPEX()
Destructor.
Definition: MuGen.cpp:6276
MVnormBetaFt(gsl_vector *b, const gsl_matrix *Sig, gsl_matrix *pred, const size_t &iCl, gsl_matrix *allFt, const size_t &begRw, const gsl_rng *r)
Multivariate random constructor with vector.
Definition: MuGen.h:1523
MVnormMu()
Default constructor.
Definition: MuGen.cpp:492
gsl_matrix * _errorInvVar
Matrix of error inverse-variances.
Definition: MuGen.h:3450
size_t _d
Dimension of the matrix.
Definition: MuGen.h:5572
BetaGrpSnpMissCV(const string &predFlNam, const string &outFlNam, RanIndex &low, const size_t &Npred, const size_t &d, const int &Nthr, const double &absLab)
Constructor with replication and -values.
Definition: MuGen.h:4994
SigmaIblk()
Default constructor.
Definition: MuGen.cpp:13286
Single-SNP regression with conditional variance.
Definition: MuGen.h:4632
virtual const size_t * up() const
Points to the prior.
Definition: MuGen.h:655
void update(const Grp &dat, const SigmaI &SigIm, const Grp &muPr, const SigmaI &SigIp)
Gaussian likelihood, non-zero mean Gaussian prior.
Definition: MuGen.h:4475
BetaGrpPEX(const Grp &rsp, const string &predFlNam, const size_t &Npred, const double &Spr, RanIndex &up, const string &outFlNam, const int &nThr)
Simple constructor with a prior index and output file name.
Definition: MuGen.h:4096
const vector< size_t > & getIndVec() const
Retrieve the index vector.
Definition: MuGen.h:2189
BetaGrpPCpex(const Grp &rsp, const string &predFlNam, const string &evFlNam, const size_t &Npred, const double &Spr, RanIndex &up, const int &nThr)
Constructor with a prior index.
Definition: MuGen.h:4408
Standard Student- weights.
Definition: MuGen.h:5956
int _nThr
Number of threads.
Definition: MuGen.h:4511
BetaGrpPCpex(const Grp &rsp, const string &predFlNam, const string &evFlNam, const size_t &Npred, const double &Spr, RanIndex &up, const string &outFlNam, const int &nThr)
Constructor with a prior index, replication and output file name.
Definition: MuGen.h:4439
vector< list< double > > _errorInvVar
Measurement error inverse-variances.
Definition: MuGen.h:3540
MVnormMuMiss(const size_t &d)
0-mean deterministic constructor
Definition: MuGen.h:1090
vector< gsl_matrix_view > _eachLS
Prior matrix submatrices.
Definition: MuGen.h:5804
SigmaIpex(const Grp &dat, const string &outFlNam, const double &prDiag, const double &nu0)
Location data-based constructor with output file name.
Definition: MuGen.h:5913
double _numSaves
Number of saves.
Definition: MuGen.h:4835
void dump()
Dump results to the output file.
Definition: MuGen.cpp:10587
double _priorVar
Prior variance.
Definition: MuGen.h:4521
virtual double mhl(const MVnorm *x, const SigmaI &SigI)
Mahalanobis distance to a vector.
Definition: MuGen.cpp:384
virtual const vector< double > props() const
Proportions of each group.
Definition: MuGen.cpp:4152
vector< double > _scale
Vector of scales.
Definition: MuGen.h:1863
MVnormBetaFt(const Grp &resp, gsl_matrix *pred, const size_t &iCl, gsl_matrix *allFt, const size_t &begRw, const gsl_matrix *Sig, const gsl_rng *r, gsl_matrix *bet, const size_t &iRw)
Multivariate random constructor with Grp type response.
Definition: MuGen.h:1627
vector< gsl_vector_view > _eachVec
Trait blocks.
Definition: MuGen.h:1851
BetaGrpFt()
Default constructor.
Definition: MuGen.cpp:7053
BetaGrpPEX(const Grp &rsp, const string &predFlNam, const size_t &Npred, const double &Spr, const double &absLab, RanIndex &up, const string &outFlNam, const int &nThr)
Missing data constructor with a prior index and output file name.
Definition: MuGen.h:4154
MVnormMuMiss(const MVnormMuMiss &)
Deterministic copy constructor.
void _finishFitted()
Adjusted matrix calculation.
Definition: MuGen.cpp:8671
void _updateFitted()
Update fitted values.
Definition: MuGen.cpp:11265
MVnormBetaFtBlk(const gsl_matrix *resp, gsl_matrix *pred, vector< double > &eaFt, const vector< size_t > &iCl, const gsl_matrix *Sig, const vector< size_t > &blkStart, const gsl_rng *r, const size_t &up, gsl_matrix *bet, const size_t &iRw)
Constructor with a prior index.
Definition: MuGen.h:2049
Individual vector of means with missing data.
Definition: MuGen.h:1065
MVnormBetaFt(const gsl_matrix *resp, gsl_matrix *pred, const size_t &iCl, vector< double > &eaFt, const gsl_matrix *Sig, const gsl_rng *r, const size_t &up, gsl_matrix *bet, const size_t &iRw)
Multivariate random constructor with response matrix and prior index.
Definition: MuGen.h:1609
gsl_rng * _r
Pointer to a PNG.
Definition: MuGen.h:2105
const vector< vector< size_t > > * _eachLL
Data matrix row indexes.
Definition: MuGen.h:1783
MuGrp operator+(const Grp &m1, const Grp &m2)
Addition operator.
Definition: MuGen.cpp:4978
BetaBlk()
Default constructor.
Definition: MuGen.h:5429
void update(const Grp &dat, const SigmaI &SigIm, const SigmaI &SigIp)
Gaussian likelihood, 0-mean Gaussian prior.
Definition: MuGen.h:4470
void _updateFitted()
Update adjusted values.
Definition: MuGen.cpp:6434
MVnormBetaFt(gsl_vector *b, const gsl_vector *sd, gsl_matrix *pred, const size_t &iCl, gsl_matrix *allFt, const size_t &begRw, const gsl_rng *r, const size_t &up)
Univariate random constructor with vector and prior index.
Definition: MuGen.h:1507
size_t getNtot()
Number of lower-level elements.
Definition: MuGen.h:2233
const size_t * up() const
Points to the prior.
Definition: MuGen.h:1455
const size_t * up() const
Points to the prior.
Definition: MuGen.h:1817
void update(const Grp &mu, const SigmaI &SigIm, const gsl_rng *r)
Gaussian likelihood.
Definition: MuGen.cpp:1557
MVnormBetaFt(gsl_vector *b, const gsl_matrix *Sig, gsl_matrix *pred, const size_t &iCl, gsl_matrix *allFt, const size_t &begRw, const gsl_rng *r, const size_t &up)
Multivariate random constructor with vector and prior index.
Definition: MuGen.h:1539
virtual void update(const Grp &, const Qgrp &, const SigmaI &, const SigmaI &)=0
Student- likelihood, 0-mean Gaussian prior.
const vector< size_t > * _blkStart
Start positions of blocks.
Definition: MuGen.h:1770
gsl_matrix * _adjValMat
Adjusted value matrix.
Definition: MuGen.h:3229
Simple single-SNP regression class with missing data.
Definition: MuGen.h:4807
double _absLab
Missing value label.
Definition: MuGen.h:4840
MuGrp & operator=(const MuGrp &mG)
Assignemnt operator.
Definition: MuGen.cpp:6036
~MixP()
Destructor.
Definition: MuGen.h:6292
RanIndex * _upLevel
Upper level index.
Definition: MuGen.h:2737
const size_t & priorInd(const size_t i) const
Upper-level index.
Definition: MuGen.h:2207
string _outFile
Output file name.
Definition: MuGen.h:5968
RanIndexVS()
Default constructor.
Definition: MuGen.cpp:4252
MVnormBetaPEX()
Default constructor.
Definition: MuGen.h:993
gsl_matrix * _LamSc
Prior inverse-covariance.
Definition: MuGen.h:5583
virtual const gsl_matrix * fMat() const
Access the value matrix.
Definition: MuGen.h:2958
MixP(const vector< double > &initP)
Constructor with a vector of proportions.
Definition: MuGen.h:6225
vector< bool > _acceptDrop
Accept a drop.
Definition: MuGen.h:2382
vector< size_t > & operator[](const size_t i)
Subscript operator.
Definition: MuGen.h:2180
virtual const gsl_matrix * dMat() const
Access the value matrix.
Definition: MuGen.h:2951
MuGrp()
Default constructor.
Definition: MuGen.h:3064
size_t _myInd
own index
Definition: MuGen.h:1078
BetaGrpPEX(const Grp &rsp, const SigmaI &SigI, const string &predFlNam, const size_t &Npred, const double &Spr, const double &Nmul, const double &rSqMax, const double &absLab, RanIndex &low, RanIndex &up, const string &outFlNam, const int &nThr)
Selection constructor with missing predictor data and replication.
Definition: MuGen.h:4259
MVnormBetaFt(const gsl_matrix *resp, gsl_matrix *pred, const size_t &iCl, gsl_matrix *allFt, const size_t &begRw, const gsl_matrix *Sig, const gsl_rng *r, gsl_matrix *bet, const size_t &iRw)
Multivariate random constructor with response matrix.
Definition: MuGen.h:1557
virtual ~MVnorm()
Virtual destructor.
Definition: MuGen.h:350
Individual vector of means with blocks of traits.
Definition: MuGen.h:1757
MVnormMuBlk()
Default constructor.
Definition: MuGen.h:1787
Individual regression with parameter expansion.
Definition: MuGen.h:968
BetaGrpSnpCV(const string &predFlNam, const string &outFlNam, const size_t &Ndat, const size_t &Npred, const size_t &d, const int &Nthr, const double &prVar)
Constructor with no replication and ABF.
Definition: MuGen.h:4677
MuGrpMiss()
Default constructor.
Definition: MuGen.h:3377
void update(const Grp &dat, const Qgrp &q, const SigmaI &SigIm, const Grp &muPr, const Qgrp &qPr, const SigmaI &SigIp)
Student- likelihood, non-zero mean Student- prior.
Definition: MuGen.h:4478
vector< size_t > _misInd
Index of the rows with missing data.
Definition: MuGen.h:3373
string _inPredFl
Predictor (SNP) file name.
Definition: MuGen.h:4524
size_t _Ntp
Original number of predictors.
Definition: MuGen.h:2369
const gsl_matrix * fMat() const
Access adjusted fitted value matrix.
Definition: MuGen.h:4937
~BetaGrpSnpMissCV()
Destructor.
Definition: MuGen.h:5027
virtual void update(const Grp &, const Qgrp &, const SigmaI &, const SigmaI &, const gsl_rng *)=0
Student- likelihood, Gaussian prior.
void setPr(const double &pr)
Set prior value.
Definition: MuGen.cpp:4807
virtual void update(const Grp &, const Qgrp &, const SigmaI &, const double &, const SigmaI &, const gsl_rng *)=0
Student- likelihood, Student- prior.
const vector< size_t > * _blkStart
Start positions of blocks.
Definition: MuGen.h:1845
const double & operator[](const size_t i) const
Subscript operator.
Definition: MuGen.h:6310
double getSrDet() const
Access the square-root of the determinant.
Definition: MuGen.h:5780
gsl_matrix * _meanVal
Matrix of means.
Definition: MuGen.h:3455
void dump()
Dump results to the output file.
Definition: MuGen.cpp:10341
"Random effect" with parameter expansion
Definition: MuGen.h:3223
virtual ~Grp()
Destructor.
Definition: MuGen.cpp:5527
vector< size_t > _presInd
Vector of indexes of present data.
Definition: MuGen.h:5964
RanIndex()
Default constructor.
Definition: MuGen.cpp:4023
void save(const char *how="a")
Save to a stored file name.
Definition: MuGen.cpp:13608
vector< bool > _mcmcTrack
Transition tracking variable.
Definition: MuGen.h:2361
Generic index class.
Definition: MuGen.h:2084
virtual void save(const Grp &y, const Grp &theta, const SigmaI &SigIe)
Probability save.
Definition: MuGen.h:2289
SigmaI & operator=(const SigmaI &)
Assignment operator.
Definition: MuGen.cpp:13077
MVnormMuMiss & operator=(const MVnormMuMiss &)
Assignment operator.
void update(const Grp &dat, const SigmaI &SigIm, const SigmaI &SigIp, const gsl_rng *r)
Gaussian likelihood, Gaussian prior.
Definition: MuGen.cpp:1243
void dump()
Dump to a file.
Definition: MuGen.cpp:8538
MixP()
Default constructor.
Individual vector of conditional regression coefficients with blocks of traits.
Definition: MuGen.h:1968
virtual void update(const Grp &y, const SigmaI &SigIe, BetaGrpBVSR *theta, const SigmaI &SigIp)
Variable selection update.
Definition: MuGen.h:2335
virtual void update(const Grp &, const SigmaI &, const Grp &, const double &, const SigmaI &, const gsl_rng *)=0
Gaussian likelihood, Student- prior.
MVnormBetaFt()
Default constructor.
Definition: MuGen.h:1475
MVnormBetaFtBlk(const Grp &resp, gsl_matrix *pred, vector< double > &eaFt, const vector< size_t > &iCl, const gsl_matrix *Sig, const vector< size_t > &blkStart, const gsl_rng *r, const size_t &up, gsl_matrix *bet, const size_t &iRw)
Constructor with a prior index.
Definition: MuGen.h:2016
SigmaIpex(const Grp &dat, const double &prDiag, const double &nu0)
Location data-based constructor.
Definition: MuGen.h:5903
MVnormBetaFt(gsl_matrix *pred, const size_t &iCl, vector< double > &eaFt, const size_t &up, gsl_matrix *bet, const size_t &iRw)
Deterministic constructor with a prior index.
Definition: MuGen.h:1707
MVnorm()
Default constructor.
Definition: MuGen.h:262
size_t & priorInd(const size_t i)
Upper-level index.
Definition: MuGen.h:2216
Single-SNP regression with partial effects.
Definition: MuGen.h:4719
void update(const RanIndex &Nvec)
Gibbs update function.
Definition: MuGen.cpp:13942
~BetaGrpPSR()
Destructor.
Definition: MuGen.h:4781
MuGrpEE()
Default constructor.
Definition: MuGen.cpp:6615
void dump()
Dump results to the output file.
Definition: MuGen.cpp:9867
void _fillInUp()
Fill in blocks with few levels and a prior grouping.
Definition: MuGen.cpp:11845
vector< size_t > _vecInd
Indexes of upper levels.
Definition: MuGen.h:2099
void _updateExp()
Update the _expandedVM matrix.
Definition: MuGen.cpp:11803
size_t rtgeom(const double &, const size_t &, const gsl_rng *)
Truncated geometric distribution.
Definition: MuGen.cpp:120
MVnormBetaFt(const gsl_matrix *resp, gsl_matrix *pred, const size_t &iCl, gsl_matrix *allFt, const size_t &begRw, const gsl_matrix *Sig, const gsl_rng *r, const size_t &up, gsl_matrix *bet, const size_t &iRw)
Multivariate random constructor with response matrix and prior index.
Definition: MuGen.h:1575
virtual void update(const Grp &dat, const SigmaI &SigIb, const gsl_rng *r)
Gaussian likelihood.
Definition: MuGen.cpp:1986
vector< double > _pep
Posterior exclusion probabilities.
Definition: MuGen.h:2355
virtual ~MVnormMu()
Destructor.
Definition: MuGen.cpp:571
Bayesian variable selection regression.
Definition: MuGen.h:5145
BetaGrpPEX(const Grp &rsp, const string &predFlNam, const size_t &Npred, const double &Spr, const double &absLab, RanIndex &low, RanIndex &up, const string &outFlNam, const int &nThr)
Missing data constructor with a prior index, replication and output file name.
Definition: MuGen.h:4170
size_t size() const
Const length of the weight vector.
Definition: MuGen.h:6069
virtual double alpha() const
Const access to .
Definition: MuGen.h:6056
Regression with multiple predictors.
Definition: MuGen.h:1464
void update(const Grp &dat, const Qgrp &q)
Basic Student- update.
Definition: MuGen.cpp:13597
BetaGrpSnpMissCV(const string &predFlNam, const string &outFlNam, const size_t &Ndat, const size_t &Npred, const size_t &d, const int &Nthr, const double &prVar, const double &absLab)
Constructor with no replication and ABF.
Definition: MuGen.h:5009
Dirichlet-multinomial mixture prior.
Definition: MuGen.h:6204
~BetaBlk()
Destructor.
Definition: MuGen.h:5541
Multiplicative parameter expansion for PC regression.
Definition: MuGen.h:4390
size_t _Npred
Number of predictors (SNPs)
Definition: MuGen.h:4509
vector< size_t > _blkStart
Block start indexes.
Definition: MuGen.h:5410
virtual ~MVnormMuBlk()
Destructor.
Definition: MuGen.h:1815
The abstract base class for location parameter rows.
Definition: MuGen.h:246
void MVgauss(const gsl_vector *, const gsl_matrix *, const gsl_rng *, gsl_vector *)
Multivariate Gaussian sampling function.
Definition: MuGen.cpp:77
BetaGrpPSR(const string &predFlNam, const string &outFlNam, const size_t &Ndat, const size_t &Npred, const size_t &d, const int &Nthr, const double &prVar)
Constructor with no replication and ABF.
Definition: MuGen.h:4764
virtual void update(const Grp &, const Qgrp &, const SigmaI &)=0
Student- likelihood, improper prior.
SigmaIpex(const size_t &d, const double &invVar, const double &df)
Deterministic diagonal matrix constructor.
Definition: MuGen.h:5884
vector< vector< double > > _ftA
Fitted values.
Definition: MuGen.h:3242
gsl_matrix * getMat()
Get redundant parameter matrix.
Definition: MuGen.h:2576
Data with measurement error and missing phenotypes.
Definition: MuGen.h:3534
void update(const Grp &dat)
Basic Gaussian update.
Definition: MuGen.cpp:13542
vector< vector< double > > _Xmat
Predictor array.
Definition: MuGen.h:4813
virtual void update(const Grp &, const Qgrp &, const SigmaI &, const Grp &, const SigmaI &, const gsl_rng *)=0
Student- likelihood, Gaussian prior.
BetaGrpPCpex(const Grp &rsp, const string &predFlNam, const string &evFlNam, const size_t &Npred, const double &Spr, RanIndex &low, RanIndex &up, const int &nThr)
Constructor with a prior index and replication.
Definition: MuGen.h:4423
gsl_matrix * _tmpXb
matrix for the candidate dropped/added element
Definition: MuGen.h:5154
void dump()
Dump results to the output file.
Definition: MuGen.cpp:9663
virtual void save(const Grp &y, const SigmaI &SigI)
Save with data and inverse-covariance.
Definition: MuGen.h:2922
double operator[](const size_t i) const
Subscript operator.
Definition: MuGen.h:602
BetaGrpPEX(const Grp &rsp, const string &predFlNam, const size_t &Npred, const double &Spr, const double &absLab, RanIndex &low, RanIndex &up, const int &nThr)
Missing data constructor with a prior index and replication.
Definition: MuGen.h:4140
Data with missing phenotype values.
Definition: MuGen.h:3370
MVnormBetaPEX & operator=(const MVnormBetaPEX &bet)
Assignment operator.
Definition: MuGen.cpp:1228
virtual void update(const Grp &muPr, const SigmaI &SigIm)
Gaussian prior.
Definition: MuGen.cpp:6759
BetaGrpPCpex(const Grp &rsp, const string &predFlNam, const string &evFlNam, const size_t &Npred, const double &Spr, RanIndex &low, RanIndex &up, const string &outFlNam, const int &nThr)
Constructor with a prior index and replication.
Definition: MuGen.h:4455
Single-SNP regression with partial effects and missing data.
Definition: MuGen.h:5052
void update(const Grp &dat, const Grp &mu, const SigmaI &SigI)
Update with a mean.
Definition: MuGen.cpp:13801
unsigned long long rdtsc()
Accessing the processor RTDSC instruction.
Definition: MuGen.cpp:264
BetaGrpPSRmiss(const string &predFlNam, const string &outFlNam, RanIndex &low, const size_t &Npred, const size_t &d, const int &Nthr, const double &absLab)
Constructor with replication and -values.
Definition: MuGen.h:5085
MVnormMuMiss()
Default constructor.
Definition: MuGen.h:1082
Multivariate multiple regression with parameter expansion.
Definition: MuGen.h:4004
gsl_matrix * _fakeFmat
Matrix for addition operators.
Definition: MuGen.h:4819
BetaGrpPSRmiss()
Default constructor.
Definition: MuGen.h:5057
vector< vector< double > > _fittedEach
Partial fitted value matrices.
Definition: MuGen.h:3616
virtual size_t nMissP() const
Number of missing values.
Definition: MuGen.h:631
void update(const Grp &dat, const SigmaI &SigIm, const Qgrp &qPr, const SigmaI &SigIp)
Gaussian likelihood, 0-mean Student- prior.
Definition: MuGen.h:4472
virtual void update(const Grp &, const SigmaI &, const Grp &, const Qgrp &, const SigmaI &)=0
Gaussian likelihood, non-zero mean Student- prior.
BetaGrpPEX(const Grp &rsp, const SigmaI &SigI, const string &predFlNam, const size_t &Npred, const double &Spr, const double &Nmul, const double &rSqMax, RanIndex &low, RanIndex &up, const string &outFlNam, const int &nThr)
Selection constructor with replication.
Definition: MuGen.h:4214
Apex()
Default constructor.
Definition: MuGen.cpp:4753
vector< size_t > _misPhenInd
Missing data index.
Definition: MuGen.h:1072
void _fillIn()
Fill in blocks with few levels.
Definition: MuGen.cpp:11822
void _finishConstruct(const double &Spr)
Finish construction.
Definition: MuGen.cpp:8654
BetaGrpSnpMissCV & operator=(const BetaGrpSnpMissCV &mG)
Assignment operator.
Definition: MuGen.cpp:10322
~MuGrpEE()
Destructor.
Definition: MuGen.cpp:6714
QgrpPEX()
Default constructor.
Definition: MuGen.h:6124
virtual void update(const Grp &, const Qgrp &, const SigmaI &, const Grp &, const double &, const SigmaI &, const gsl_rng *)=0
Student- likelihood, Student- prior.
virtual void update(const Grp &dat, const SigmaI &SigIm, const gsl_rng *r)
Gaussian likelihood.
Definition: MuGen.cpp:582
BetaGrpSnpMissCV(const string &predFlNam, const string &outFlNam, RanIndex &low, const size_t &Npred, const size_t &d, const int &Nthr, const double &prVar, const double &absLab)
Constructor with replication and ABF.
Definition: MuGen.h:5024
virtual void update(const Grp &, const SigmaI &, const SigmaI &)=0
Gaussian likelihood, 0-mean Gaussian prior.
virtual void save(const Grp &y, const BetaGrpBVSR *theta, const SigmaI &SigIe)
Variable selection save.
Definition: MuGen.h:2279
Multivariate multiple regression.
Definition: MuGen.h:3609
Individual vector of means with parameter expansion.
Definition: MuGen.h:887
virtual ~MVnormBetaFt()
Destructor.
Definition: MuGen.h:1725
vector< bool > _rejectAdd
Rject an addition.
Definition: MuGen.h:2400
virtual void dump()
Dump to a file.
Definition: MuGen.h:2938
gsl_vector_view _X
Predictor.
Definition: MuGen.h:1257
virtual void save()
Save to pre-specified file.
Definition: MuGen.cpp:5540
string _outFlNam
Output file name.
Definition: MuGen.h:5588
vector< vector< double > > _ftA
Fitted values.
Definition: MuGen.h:4018
vector< vector< size_t > > _idx
Indexes of lower levels.
Definition: MuGen.h:2093
virtual const vector< size_t > getMisPhen() const
Indexes of missing values.
Definition: MuGen.h:863
virtual double lnOddsRat(const Grp &y, const SigmaI &SigI, const size_t i) const
Log-odds ratio.
Definition: MuGen.h:2981
vector< MVnorm * > _theta
Vector of pointers to value rows.
Definition: MuGen.h:2720
BetaGrpPSRmiss(const string &predFlNam, const string &outFlNam, const size_t &Ndat, const size_t &Npred, const size_t &d, const int &Nthr, const double &absLab)
Constructor with no replication and -values.
Definition: MuGen.h:5071
~BetaGrpPCpex()
Destructor.
Definition: MuGen.h:4458
MVnormMu(const size_t &d)
Zero vector constructor.
Definition: MuGen.h:703
void save(const string &outFlNam)
Save adjusted values to named file.
Definition: MuGen.h:4467
MVnorm & operator=(const MVnorm &)
Assignement operator.
Definition: MuGen.cpp:343
Student- weights for PEX.
Definition: MuGen.h:6117
BetaGrpPEX(const Grp &rsp, const string &predFlNam, const size_t &Npred, const double &Spr, RanIndex &low, RanIndex &up, const int &nThr)
Simple constructor with a prior index and replication.
Definition: MuGen.h:4083
gsl_matrix * _valueSum
Sample storage matrix.
Definition: MuGen.h:3626
const gsl_matrix * getMat() const
Access to the inverse-covariance matrix.
Definition: MuGen.h:5772
MVnormMuPEX()
Default constructor.
Definition: MuGen.h:906
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.
Definition: MuGen.h:6175
int _nThr
Number of threads to use.
Definition: MuGen.h:4830
QgrpPEX(const size_t &N, const double &nu)
Deterministic constructor with degrees of freedom.
Definition: MuGen.h:6139
const size_t * _upLevel
Pointer to a row index of the prior.
Definition: MuGen.h:1870
vector< bool > _acceptAdd
Accept an addition.
Definition: MuGen.h:2394
void save(FILE *fileStr)
Save to file stream.
Definition: MuGen.h:5761
gsl_rng * _r
Pseudo-random number generator.
Definition: MuGen.h:5974
void update(const Grp &muPr, const SigmaI &SigIm)
Standard Gaussian imputation.
Definition: MuGen.cpp:7012
BetaGrpSnpMissCV()
Default constructor.
Definition: MuGen.h:4966
virtual ~BetaGrpPC()
Destructor.
Definition: MuGen.h:4368
vector< gsl_vector_view > _eachVec
Trait blocks.
Definition: MuGen.h:1776
SigmaIpex(const size_t &d, const double &invVar, const double &df, const string &outFlNam)
Deterministic diagonal matrix constructor with output file name.
Definition: MuGen.h:5894
int _nThr
number of threads
Definition: MuGen.h:3244
const size_t * up() const
Points to the prior.
Definition: MuGen.h:1946
double operator[](const size_t i) const
Const subscript operator.
Definition: MuGen.h:6042
double alpha()
Access to .
Definition: MuGen.h:6190
virtual void init(const vector< vector< size_t > > &idx, const vector< vector< size_t > > &rLD)
Initialization function.
Definition: MuGen.cpp:4165
~MuGrpEEmiss()
Destructor.
Definition: MuGen.h:3583
double _scale
Scale parameter.
Definition: MuGen.h:981
QgrpPEX(const size_t &N)
Deterministic size-only constructor.
Definition: MuGen.h:6131
MVnormBetaFt(const Grp &resp, gsl_matrix *pred, const size_t &iCl, vector< double > &eaFt, const gsl_matrix *Sig, const gsl_rng *r, gsl_matrix *bet, const size_t &iRw)
Multivariate random constructor with Grp type response.
Definition: MuGen.h:1662
BetaGrpPSRmiss(const string &predFlNam, const string &outFlNam, const size_t &Ndat, const size_t &Npred, const size_t &d, const int &Nthr, const double &prVar, const double &absLab)
Constructor with no replication and ABF.
Definition: MuGen.h:5100
gsl_matrix * _Xmat
Predictor matrix.
Definition: MuGen.h:3631
size_t _N
Length of the predictor.
Definition: MuGen.h:983
Grp()
Definition: MuGen.cpp:5517
virtual void update(const Grp &dat, const SigmaI &SigIm)
Gaussian likelihood, improper prior.
Definition: MuGen.cpp:6053
size_t getNgrp()
Number of upper-level elements.
Definition: MuGen.h:2250
PEX inverse-covariance.
Definition: MuGen.h:5867