Learn R Programming

lgspline (version 0.2.0)

compute_G_eigen: Compute Eigenvalues and Related Matrices for G

Description

Compute Eigenvalues and Related Matrices for G

Usage

compute_G_eigen(
  X_gram,
  Lambda,
  K,
  parallel,
  cl,
  chunk_size,
  num_chunks,
  rem_chunks,
  family,
  unique_penalty_per_partition,
  L_partition_list,
  keep_G = TRUE,
  shur_corrections
)

Value

List containing combinations of:

  • G - Full \(\textbf{G}\) matrix (if keep_G=TRUE)

  • Ghalf - \(\textbf{G}^{1/2}\) matrix

  • GhalfInv - \(\textbf{G}^{-1/2}\) matrix (for non-identity links)

Arguments

X_gram

Gram matrix list (\(\textbf{X}^{T}\textbf{X}\))

Lambda

Penalty matrix (\(\boldsymbol{\Lambda}\))

K

Number of partitions minus 1 (\(K\))

parallel

Use parallel processing

cl

Cluster object

chunk_size

Chunk size for parallel

num_chunks

Number of chunks

rem_chunks

Remaining chunks

family

GLM family

unique_penalty_per_partition

Use partition penalties

L_partition_list

Partition penalty list (\(\textbf{L}_\text{partition\_list}\))

keep_G

Return full G matrix (\(\textbf{G}\))

shur_corrections

List of Shur complement corrections (\(\textbf{S}\))

Details

Computes \(\textbf{G}\), \(\textbf{G}^{1/2}\) and \(\textbf{G}^{-1/2}\) matrices via eigendecomposition of \(\textbf{X}^{T}\textbf{X} + \boldsymbol{\Lambda}_\text{effective} + \textbf{S}\). Handles partition-specific penalties and parallel processing. For non-identity link functions, also returns \(\textbf{G}^{-1/2}\).