API
Documentation for VarianceComponentModels.jl
's types and methods.
Index
VarianceComponentModels.TwoVarCompModelRotate
VarianceComponentModels.TwoVarCompVariateRotate
VarianceComponentModels.VarianceComponentModel
VarianceComponentModels.VarianceComponentVariate
VarianceComponentModels.fit_mle!
VarianceComponentModels.fit_reml!
VarianceComponentModels.mle_fs!
VarianceComponentModels.mle_mm!
Types
#
VarianceComponentModels.VarianceComponentModel
— Type.
VarianceComponentModel
stores the model parameters of a variance component model.
Fields
B
:p x d
mean parametersΣ
: tuple ofd x d
variance component parametersA
: constraint matrix forvec(B)
sense
: vector of characters'='
,'<'
or'>'
b
: constraint vector forvec(B)
lb
: lower bounds forvec(B)
ub
: upper bounds forvec(B)
#
VarianceComponentModels.VarianceComponentVariate
— Type.
VarianceComponentVariate
stores the data of a variance component model.
Feilds
Y
:n x d
responsesX
:n x p
predictorsV
: tuple ofn x n
covariance matrices
#
VarianceComponentModels.TwoVarCompModelRotate
— Type.
TwoVarCompModelRotate
stores the rotated two variance component model.
Fields
Brot
: rotated mean parametersB * eigvec
eigval
: eigenvalues ofeig(Σ[1], Σ[2])
eigvec
: eigenvectors ofeig(Σ[1], Σ[2])
logdetΣ2
: log-determinant ofΣ[2]
#
VarianceComponentModels.TwoVarCompVariateRotate
— Type.
TwoVarCompVariateRotate
stores the rotated two variance component data.
Fields
Yrot
: rotated responseseigvec * Y
Xrot
: rotated covariateseigvec * X
eigval
: eigenvalues ofeig(V[1], V[2])
eigvec
: eigenvectors ofeig(V[1], V[2])
logdetV2
: log-determinant ofV[2]
Functions
#
VarianceComponentModels.mle_fs!
— Function.
mle_fs!(vcmodel, vcdatarot; maxiter, solver, qpsolver, verbose)
Find MLE by Fisher scoring algorithm.
Input
vcmodel
: two variane component modelVarianceComponentModel
, with
vcmodel.B
and vcmodel.Σ
used as starting point
vcdatarot
: rotated two varianec component dataTwoVarCompVariateRotate
Keyword
maxiter::Int
: maximum number of iterations, default is 1000solver::Symbol
: backend nonlinear programming solver,:Ipopt
(default) or:Knitro
qpsolver::Symbol
: backend quadratic programming solver,:Ipopt
(default) or:Gurobi
orMosek
verbose::Bool
: display information
Output
maxlogl
: log-likelihood at solutionvcmodel
:VarianceComponentModel
with updated model parametersΣse=(Σse[1],Σse[2])
: standard errors of estimateΣ=(Σ[1],Σ[2])
Σcov
: covariance matrix of estimateΣ=(Σ[1],Σ[2])
Bse
: standard errors of estimateB
Bcov
: covariance of estimateB
#
VarianceComponentModels.mle_mm!
— Function.
mle_mm!(vcmodel, vcdatarot; maxiter, qpsolver, verbose)
Find MLE by minorization-maximization (MM) algorithm.
Input
vcmodel
: two variane component modelVarianceComponentModel
, with
vcmodel.B
and vcmodel.Σ
used as starting point
vcdatarot
: rotated two varianec component dataTwoVarCompVariateRotate
Keyword
maxiter::Int
: maximum number of iterations, default is 1000qpsolver::Symbol
: backend quadratic programming solver,:Ipopt
(default) or:Gurobi
orMosek
verbose::Bool
: display information
Output
maxlogl
: log-likelihood at solutionvcmodel
:VarianceComponentModel
with updated model parametersΣse=(Σse[1],Σse[2])
: standard errors of estimateΣ=(Σ[1],Σ[2])
Σcov
: covariance matrix of estimateΣ=(Σ[1],Σ[2])
Bse
: standard errors of estimateB
Bcov
: covariance of estimateB
Reference
- H. Zhou, L. Hu, J. Zhou, and K. Lange (2015) MM algorithms for variance components models. http://arxiv.org/abs/1509.07426
#
VarianceComponentModels.fit_mle!
— Function.
fit_mle!(vcmodel, vcdata; algo)
Find MLE of variane component model.
Input
vcmodel
: two variane component modelVarianceComponentModel
, with
vcmodel.B
and vcmodel.Σ
used as starting point
vcdata
: two varianec component dataVarianceComponentVariate
Keyword
algo::Symbol
: algorithm,:FS
(Fisher scoring) for:MM
(minorization-maximization algorithm)
Output
maxlogl
: log-likelihood at solutionvcmodel
:VarianceComponentModel
with updated model parametersΣse=(Σse[1],Σse[2])
: standard errors of estimateΣ=(Σ[1],Σ[2])
Σcov
: covariance matrix of estimateΣ=(Σ[1],Σ[2])
Bse
: standard errors of estimateB
Bcov
: covariance of estimateB
#
VarianceComponentModels.fit_reml!
— Function.
fit_reml!(vcmodel, vcdata; algo)
Find restricted MLE (REML) of variane component model.
Input
vcmodel
: two variane component modelVarianceComponentModel
, with
vcmodel.B
and vcmodel.Σ
used as starting point
vcdata
: two varianec component dataVarianceComponentVariate
Keyword
algo::Symbol
: algorithm,:FS
(Fisher scoring) for:MM
(minorization-maximization algorithm)
Output
maxlogl
: log-likelihood at solutionvcmodel
:VarianceComponentModel
with updated model parametersΣse=(Σse[1],Σse[2])
: standard errors of estimateΣ=(Σ[1],Σ[2])
Σcov
: covariance matrix of estimateΣ=(Σ[1],Σ[2])
Bse
: standard errors of estimateB
Bcov
: covariance of estimateB