dot-solver_recompute_G_at_estimate: Recompute G, Ghalf, and GhalfInv at a Supplied Coefficient...

.solver_recompute_G_at_estimateR Documentation

Recompute G, Ghalf, and GhalfInv at a Supplied Coefficient Estimate

Description

Given current constrained coefficient estimates result, recomputes the penalized information matrix \mathbf{G}_k = (\mathbf{X}_k^{\top}\mathbf{W}_k \mathbf{D}_k\mathbf{X}_k + \boldsymbol{\Lambda}_k)^{-1} and its matrix square roots for each partition.

Usage

.solver_recompute_G_at_estimate(
  X,
  y,
  result,
  K,
  Lambda,
  family,
  order_list,
  glm_weight_function,
  schur_correction_function,
  need_dispersion_for_estimation,
  dispersion_function,
  observation_weights,
  VhalfInv,
  parallel_eigen,
  parallel_matmult,
  cl,
  chunk_size,
  num_chunks,
  rem_chunks,
  unique_penalty_per_partition,
  L_partition_list,
  ...
)

Arguments

X

List of partition-specific design matrices \mathbf{X}_k.

y

List of response vectors \mathbf{y}_k by partition.

result

List of current coefficient column vectors \tilde{\boldsymbol{\beta}}_k by partition.

K

Integer; number of interior knots.

Lambda

Shared p \times p penalty matrix.

family

GLM family object.

order_list

List of index vectors mapping partition rows to original data ordering.

glm_weight_function

Function computing GLM working weights \mathbf{W}_k.

schur_correction_function

Function computing Schur corrections to the information matrix.

need_dispersion_for_estimation

Logical; if TRUE, estimate dispersion before computing weights.

dispersion_function

Dispersion estimation function.

observation_weights

List of observation weights \mathbf{D}_k by partition.

VhalfInv

Inverse square root correlation matrix, or NULL.

parallel_eigen, parallel_matmult

Logical flags for parallel computation.

cl

Parallel cluster object.

chunk_size, num_chunks, rem_chunks

Parallel distribution parameters.

unique_penalty_per_partition

Logical.

L_partition_list

List of partition-specific penalty matrices.

...

Passed to weight, correction, and dispersion functions.

Details

This is used after Newton-Raphson convergence in Path 3 of get_B() and at the final return in blockfit_solve() when return_G_getB = TRUE. The implementation matches .recompute_G_at_estimate() exactly; it exists here so both solvers can call the same numerical core.

Value

A list with components G, Ghalf, and GhalfInv, each a list of K+1 matrices. G[[k]] is computed as tcrossprod(Ghalf[[k]]) to guarantee exact symmetry.


lgspline documentation built on Aug. 5, 2026, 1:10 a.m.