Learn R Programming

catalytic (version 0.1.0)

update_lmm_variance: Calculates the log-likelihood for linear mixed models (LMMs) by combining observed and synthetic log-likelihoods based on the variance parameters.

Description

This function evaluates the log-likelihood of observed and synthetic data, using residual and random-effect variance terms to determine the fit of variance parameters in the mixed model context.

Usage

update_lmm_variance(
  residual_variance,
  random_effect_variance,
  obs_z_eigenvalues,
  syn_z_eigenvalues,
  obs_adjusted_residuals,
  syn_adjusted_residuals,
  tau
)

Value

The sum of observed and synthetic log-likelihoods.

Arguments

residual_variance

Numeric, the variance associated with the residual errors.

random_effect_variance

Numeric, the variance associated with random effects.

obs_z_eigenvalues

Vector, eigenvalues of the observed Z matrix of data.

syn_z_eigenvalues

Vector, eigenvalues of the synthetic Z matrix of data.

obs_adjusted_residuals

Vector, adjusted residuals of observed data.

syn_adjusted_residuals

Vector, adjusted residuals of synthetic data.

tau

Numeric, weight factor for the synthetic data.