public class EMMAforDoubleMatrix
Class for implementation of the EMMA algorithm often used in GWAS. Initially developer by Kang et al Genetics March 2008 178:1709-1723
protected DoubleMatrix y
protected kotlin.Array[] lambda
protected kotlin.Array[] eta2
protected double c
protected int N
protected int q
protected int Nran
protected int dfMarker
protected DoubleMatrix Xoriginal
protected DoubleMatrix X
protected DoubleMatrix Zoriginal
protected DoubleMatrix Z
protected DoubleMatrix K
protected EigenvalueDecomposition eig
protected EigenvalueDecomposition eigA
protected DoubleMatrix U
protected DoubleMatrix invH
protected DoubleMatrix invXHX
protected DoubleMatrix beta
protected DoubleMatrix Xbeta
protected double ssModel
protected double ssError
protected double SST
protected double Rsq
protected int dfModel
protected int dfError
protected double delta
protected double varResidual
protected double varRandomEffect
protected DoubleMatrix blup
protected DoubleMatrix pred
protected DoubleMatrix res
protected DoubleMatrix pev
protected double lnLikelihood
protected boolean findDelta
protected boolean calculatePEV
protected double lowerlimit
protected double upperlimit
protected int nregions
protected double convergence
protected int maxiter
protected int subintervalCount
public EMMAforDoubleMatrix(DoubleMatrix y, DoubleMatrix fixed, DoubleMatrix kin, int nAlleles)
public EMMAforDoubleMatrix(DoubleMatrix data, DoubleMatrix fixed, DoubleMatrix kin, int nAlleles, double delta)
This constructor assumes that Z is the identity matrix for calculating blups, predicted values and residuals. If that is not true use the contstructor that explicity takes Z. This constructor treats A as ZKZ' so it can be used if blups and residuals are not needed.
data - fixed - kin - nAlleles - delta - public EMMAforDoubleMatrix(DoubleMatrix data, DoubleMatrix fixed, DoubleMatrix kin, DoubleMatrix inZ, int nAlleles, double delta)
This constructor should be used when Z is not the identity matrix. Z is needed to calculate blups and residuals.
data - fixed - kin - inZ - nAlleles - delta - public EMMAforDoubleMatrix(DoubleMatrix data, DoubleMatrix fixed, DoubleMatrix kin)
This constructor is designed for G-BLUP. Uses kinship matrix with phenotypes in same order. Phenotypes = NaN for prediction set. Assumes that Z is the identity matrix for calculating blups, predicted values and residuals. If that is not true use the constructor that explicity takes Z. This constructor treats A as ZKZ' so it can be used if blups and residuals are not needed.
data - A column double matrix of phenotypic values (number of individuals x 1 taxa ID column + number of traits)fixed - kin - protected void init()
public void solve()
public void calculateBlupsPredictedResiduals()
public void calculateBlupsPredicted()
public void calculateBLUP()
public int getDfMarker()
public DoubleMatrix getBeta()
public int getDfModel()
public int getDfError()
public double getDelta()
public DoubleMatrix getInvH()
public double getVarRes()
public double getVarRan()
public DoubleMatrix getBlup()
public DoubleMatrix getPev()
public DoubleMatrix getPred()
public DoubleMatrix getRes()
public double getLnLikelihood()
public kotlin.Array[] getMarkerFp()
public void solveWithNewData(DoubleMatrix y)
public void setCalculatePEV(boolean calculatePEV)