| .bf_sqp_loop | R Documentation |
Runs a damped sequential quadratic programming loop using
quadprog::solve.QP at each iteration, enforcing all
smoothness equalities, flat-equality constraints, and any
user-supplied inequality constraints.
.bf_sqp_loop(
X_design,
y_design,
X_block_raw,
beta_init,
Lambda_block,
qp_Amat_combined,
qp_bvec_combined,
qp_meq_combined,
K,
p_expansions,
family,
order_list,
glm_weight_function,
schur_correction_function,
qp_score_function,
need_dispersion_for_estimation,
dispersion_function,
observation_weights,
iterate,
tol,
VhalfInv,
VhalfInv_perm,
is_gee,
deviance_fun,
X_partitions,
y_partitions,
verbose,
...
)
X_design |
|
y_design |
|
X_block_raw |
Unwhitened block-diagonal design matrix (used
for computing the linear predictor on the original scale).
For the non-GEE path this equals |
beta_init |
|
Lambda_block |
|
qp_Amat_combined |
Combined constraint matrix (equalities then inequalities). |
qp_bvec_combined |
Combined constraint RHS. |
qp_meq_combined |
Number of leading equality constraints. |
K, p_expansions |
Integers. |
family |
GLM family object. |
order_list |
Observation-index lists. |
glm_weight_function, schur_correction_function |
qp_score_function Functions. |
need_dispersion_for_estimation |
Logical. |
dispersion_function |
Function. |
observation_weights |
List or vector of weights. |
iterate |
Logical; if FALSE, takes at most two steps. |
tol |
Convergence tolerance. |
VhalfInv, VhalfInv_perm |
|
is_gee |
Logical; TRUE when called from the GEE refinement path (affects deviance computation). |
deviance_fun |
Function computing deviance; either
|
X_partitions |
List of per-partition design matrices (unwhitened); needed for Schur correction in non-GEE path. |
y_partitions |
List of per-partition response vectors (unwhitened); needed for Schur correction in non-GEE path. |
verbose |
Logical. |
... |
Forwarded to weight, dispersion, and score functions. |
This function serves two roles within blockfit_solve:
GEE Stage 2 (Case c): operates on the whitened
system \tilde{\mathbf{X}} = \mathbf{V}^{-1/2}
\mathbf{X}_{\mathrm{block}}, initialized from the damped Newton-Raphson
backfitting warm start.
Non-GEE SQP refinement: operates on the unwhitened block-diagonal design, applying inequality constraints after backfitting convergence.
A named list with elements beta_block (final
coefficient vector), result (per-partition coefficient
list), last_qp_sol (last successful solve.QP
output or NULL), converged (logical), and
final_deviance (scalar).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.