reml: REML optimization algorithms for mixed-effect models.

Description Usage Arguments Value Author(s)

View source: R/remlOptimization_algorithms.R

Description

Evaluate the REML likelihood and algorithms for iterating to find maximum REML estimates.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
reml(
  nu,
  skel,
  thetaG,
  sLc,
  modMats,
  W,
  Bpinv,
  nminffx,
  nminfrfx,
  rfxlvls,
  rfxIncContrib2loglik,
  thetaR = NULL,
  tWW = NULL,
  RHS = NULL
)

em(nuvin, thetaG, thetaR, conv, modMats, nminffx, sLc, ndgeninv, sln, r)

ai(nuvin, skel, thetaG, modMats, W, sLc, sln, r, thetaR = NULL, sigma2e = NULL)

gradFun(
  nuvin,
  thetaG,
  modMats,
  Cinv,
  sln,
  sigma2e = NULL,
  r = NULL,
  nminfrfx = NULL
)

Arguments

nu, nuvin

A list or vector of (co)variance parameters to estimate on the transformed, or nu, scale.

skel

A skeleton for reconstructing the list of (co)variance parameters.

thetaG, thetaR

Integer vectors indexing the G-structure or R-structure of the (co)variance parameters.

sLc

A sparse Matrix containing the symbolic Cholesky factorization of the coefficient matrix of the Mixed Model Equations.

modMats

A list of the model matrices used to construct the mixed model equations.

W, tWW

A sparse Matrix containing the design matrices for the fixed and random effects (W) and the cross-product of this (tWW).

Bpinv

A matrix inverse of the matrix containing the prior specification for fixed effects.

nminffx, nminfrfx, rfxlvls

Integers specifying: (1) the difference between the number of observations and fixed effects (of the full rank fixed effects design matrix (X), (2) nminffx minus the total number of random effects, and (3) a vector of levels for each term in the random effects.

rfxIncContrib2loglik

A numeric indicating the sum of constraint contributions to the log-likelihood across all terms in the random effects that have non-diagonal generalized inverse matrices (ginverse).

RHS

A sparse Matrix containing the Right-Hand Side to the Mixed Model Equations.

conv

A character vector of (co)variance parameter constraints.

ndgeninv

A logical vector indicating if each random term is associated with a generalized inverse (ginverse).

sln, r

Sparse Matrices containing the solutions or residuals of the Mixed Model Equations.

sigma2e

A numeric value for the residual variance estimate when it has been factored out of the Coefficient matrix of the Mixed Model Equations, thus converting the (co)variance components to ratios (represented by the variable lambda).

Cinv

A sparse Matrix containing the inverse of the Coefficient matrix to the Mixed Model Equations.

Value

A list or matrix containing any of the previous parameters described above, or the following that are in addition to or instead of parameters above:

loglik

The REML log-likelihood.

tyPy,logDetC

Components of the REML log-likelihood derived from the Cholesky factor of the Coefficient matrix to the Mixed Model Equations.

Cinv_ii

A vector containing the diagonal elements of the inverse of the Coefficient matrix to the Mixed Model Equations (i.e., the diagonal entries of Cinv).

AI

A matrix of values containing the Average Information matrix, or second partial derivatives of the likelihood with respect to the transformed (co)variance components (nu). The inverse of this matrix gives the sampling variances of these transformed (co)variance components.

dLdnu

A single column matrix of first derivatives of the transformed (co)variance parameters (nu) with respect to the log-Likelihood.

Author(s)

matthewwolak@gmail.com


matthewwolak/gremlin documentation built on Feb. 1, 2022, 7:55 a.m.