Learn R Programming

glmmFEL (version 1.0.5)

glmmfe_new_fit: Construct a glmmFEL fitted-model object

Description

Internal helper to standardize creation of the fitted-model object returned by glmmFEL() and related engines.

This branch stores only a single variance component tau2 with \(G = \tau^2 I_q\). More structured covariance parameterizations and the formula wrapper are intentionally removed to reduce complexity.

Usage

glmmfe_new_fit(
  y,
  X,
  Z,
  beta,
  eta,
  tau2,
  G = NULL,
  vcov_beta = NULL,
  vcov_eta = NULL,
  cov_beta_eta = NULL,
  var_eta = NULL,
  family,
  approx,
  control,
  convergence,
  logLik = NA_real_,
  call = NULL,
  reml = NULL
)

Value

A list of class c("glmmFELMod", "glmmFEL").

Arguments

y

Numeric response vector of length n.

X

Fixed-effects design matrix n x p.

Z

Random-effects design matrix n x q (stored as sparse dgCMatrix).

beta

Fixed-effect estimates (length p).

eta

Random-effect predictions (length q).

tau2

Non-negative scalar variance component.

G

Optional q x q covariance matrix (defaults to tau2 * I_q).

vcov_beta

Optional p x p covariance matrix for beta.

vcov_eta

Optional q x q covariance matrix for eta.

cov_beta_eta

Optional p x q cross-covariance block.

var_eta

Optional alias for prediction-error covariance of eta.

family

Canonical family label.

approx

Canonical approximation label.

control

List of control settings used.

convergence

List containing convergence information.

logLik

Approximate log-likelihood/objective (may be NA).

call

Captured match.call().

reml

Logical flag (used by RSPL/MSPL only; may be NULL otherwise).