Learn R Programming

lgspline (version 0.2.0)

compute_trace_UGXX_wrapper: Calculate Trace of Matrix Product \(\text{trace}(\textbf{X}\textbf{U}\textbf{G}\textbf{X}^{T})\)

Description

Calculate Trace of Matrix Product \(\text{trace}(\textbf{X}\textbf{U}\textbf{G}\textbf{X}^{T})\)

Usage

compute_trace_UGXX_wrapper(
  G,
  A,
  GXX,
  AGAInv,
  nc,
  nca,
  K,
  parallel,
  cl,
  chunk_size,
  num_chunks,
  rem_chunks
)

Value

Trace value

Arguments

G

List of G matrices (\(\textbf{G}\))

A

Constraint matrix (\(\textbf{A}\))

GXX

List of \(\textbf{G}\textbf{X}^{T}\textbf{X}\) products

AGAInv

Inverse of \(\textbf{A}^{T}\textbf{G}\textbf{A}\)

nc

Number of columns

nca

Number of constraint columns

K

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

parallel

Use parallel processing

cl

Cluster object

chunk_size

Size of parallel chunks

num_chunks

Number of chunks

rem_chunks

Remaining chunks

Details

Computes \(\text{trace}(\textbf{X}\textbf{U}\textbf{G}\textbf{X}^{T})\) where \(\textbf{U} = \textbf{I} - \textbf{G}\textbf{A}(\textbf{A}^{T}\textbf{G}\textbf{A})^{-1}\textbf{A}^{T}\). Handles parallel computation by splitting into chunks.