Position: 'FAST_LMM.FaST_LMM.FASTLMM'
Type: Class
Model:
$$
Y_i = \sum_{j = 1}^{p} \beta_j X_{i,j} + u_i +\epsilon_i \ \text{where } i = 1, 2,3,\dots,n
$$
where
lowRank
: boolean, whether to use the low rank methods shown in the paper;REML
: boolean, whether to use the REML methods or MLE methods.
-
sigma_g2
:float
, estimated$\sigma_g^2$ -
sigma_e2
:float
, estimated$\sigma_e^2$ -
delta
:float
, estimated$\frac{\sigma_e^2}{\sigma_g^2}$ -
beta
:float
, estimated$\hat \beta$ -
X
:np.array
, the fixed effects term of shape(n, p)
-
y
:np.array
, the phenotype data of shape(n, 1)
-
W
:np.array
, the random effects indicator matrix of shape(n, sc)
. If it is set as None,W = 1/ np.sqrt(n) X
. -
rank
:int
, the rank ofW
-
U
:np.array
, eigenvalues matrix calculated by usingsvd(W)
of shape(n, rank)
iflowRank
is set as true. -
S
: the eigenvalues array ofW
of shape(rank,)
iflowRank
is set as true.
fitting the model parameters:
X
:np.array
with shape of(n, p)
y
:np.array
with shape of(n,1)
, if it is shape of(n,)
, it will be reshape to(n,1)
W
:np.array
, the random effects indicator matrix of shape(n, sc)
. If it is set as None,W = 1/ np.sqrt(n) X
.
return: None
print the summary statistics
Get the
$\text{var}(y, y)$ . If all parameters are None then using the estimated values, otherwise using the parameter values.
Get the
$\text{var}(y, y)^{-1}$ . If all parameters are None then using the estimated values, otherwise using the parameter values.
Plotting the log-likelihood v.s.
$log(\delta)$ . Parameters is to determine whether to plot log-likelihood or restricted log-likelihood. The restricted log-likelihood is plot when botREML
andself.REML
are set as True.
Example is available in ./test_FAST_LMM.py
.