API

Documentation for VarianceComponentModels.jl's types and methods.

Index

Types

VarianceComponentModels.VarianceComponentModelType

VarianceComponentModel stores the model parameters of a variance component model.

Fields

  • B: p x d mean parameters
  • Σ: tuple of d x d variance component parameters
  • A: constraint matrix for vec(B)
  • sense: vector of characters '=', '<' or '>'
  • b: constraint vector for vec(B)
  • lb: lower bounds for vec(B)
  • ub: upper bounds for vec(B)
source
VarianceComponentModels.TwoVarCompModelRotateType

TwoVarCompModelRotate stores the rotated two variance component model.

Fields

  • Brot: rotated mean parameters B * eigvec
  • eigval: eigenvalues of eig(Σ[1], Σ[2])
  • eigvec: eigenvectors of eig(Σ[1], Σ[2])
  • logdetΣ2: log-determinant of Σ[2]
source
VarianceComponentModels.TwoVarCompVariateRotateType

TwoVarCompVariateRotate stores the rotated two variance component data.

Fields

  • Yrot: rotated responses eigvec * Y
  • Xrot: rotated covariates eigvec * X
  • eigval: eigenvalues of eig(V[1], V[2])
  • eigvec: eigenvectors of eig(V[1], V[2])
  • logdetV2: log-determinant of V[2]
source

Functions

VarianceComponentModels.mle_fs!Function
mle_fs!(vcmodel, vcdatarot; maxiter, solver, qpsolver, verbose)

Find MLE by Fisher scoring algorithm.

Input

vcmodel.B and vcmodel.Σ used as starting point

Keyword

  • maxiter::Int: maximum number of iterations, default is 1000
  • solver::Symbol: backend nonlinear programming solver, :Ipopt (default) or :Knitro
  • qpsolver::Symbol: backend quadratic programming solver, :Ipopt (default) or :Gurobi or Mosek
  • verbose::Bool: display information

Output

  • maxlogl: log-likelihood at solution
  • vcmodel: 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 estimate B
  • Bcov: covariance of estimate B
source
VarianceComponentModels.mle_mm!Function
mle_mm!(vcmodel, vcdatarot; maxiter, qpsolver, verbose)

Find MLE by minorization-maximization (MM) algorithm.

Input

vcmodel.B and vcmodel.Σ used as starting point

Keyword

  • maxiter::Int: maximum number of iterations, default is 1000
  • qpsolver::Symbol: backend quadratic programming solver, :Ipopt (default) or :Gurobi or Mosek
  • verbose::Bool: display information

Output

  • maxlogl: log-likelihood at solution
  • vcmodel: 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 estimate B
  • Bcov: covariance of estimate B

Reference

source
VarianceComponentModels.fit_mle!Function
fit_mle!(vcmodel, vcdata; algo)

Find MLE of variane component model.

Input

vcmodel.B and vcmodel.Σ used as starting point

Keyword

  • algo::Symbol: algorithm, :FS (Fisher scoring) for :MM

(minorization-maximization algorithm)

Output

  • maxlogl: log-likelihood at solution
  • vcmodel: 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 estimate B
  • Bcov: covariance of estimate B
source
VarianceComponentModels.fit_reml!Function
fit_reml!(vcmodel, vcdata; algo)

Find restricted MLE (REML) of variane component model.

Input

vcmodel.B and vcmodel.Σ used as starting point

Keyword

  • algo::Symbol: algorithm, :FS (Fisher scoring) for :MM

(minorization-maximization algorithm)

Output

  • maxlogl: log-likelihood at solution
  • vcmodel: 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 estimate B
  • Bcov: covariance of estimate B
source