% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/blockfit_solve.R
\name{.bf_case_glm_gee}
\alias{.bf_case_glm_gee}
\title{GLM + GEE Two-Stage Estimation (Case c)}
\usage{
.bf_case_glm_gee(
  X,
  y,
  K,
  p_expansions,
  flat_cols,
  split,
  family,
  order_list,
  glm_weight_function,
  schur_correction_function,
  qp_score_function,
  need_dispersion_for_estimation,
  dispersion_function,
  observation_weights,
  iterate,
  tol,
  max_backfit_iter,
  parallel_eigen,
  cl,
  chunk_size,
  num_chunks,
  rem_chunks,
  schur_zero,
  quadprog,
  qp_Amat,
  qp_bvec,
  qp_meq,
  Lambda,
  L_partition_list,
  unique_penalty_per_partition,
  A,
  constraint_values,
  Vhalf,
  VhalfInv,
  verbose,
  ...
)
}
\arguments{
\item{X}{List of \eqn{K+1} design matrices
(\eqn{N_k \times p_expansions}). Unwhitened even when GEE.}

\item{y}{List of \eqn{K+1} response vectors. Unwhitened even when GEE.}

\item{K}{Integer; number of interior knots.}

\item{p_expansions}{Integer; number of coefficients per partition.}

\item{flat_cols}{Integer vector indicating flat columns of
\eqn{\mathbf{X}^{(k)}}.}

\item{split}{Output of \code{.bf_split_components}.}

\item{family}{GLM family object.}

\item{order_list}{List of observation index vectors by partition.}

\item{glm_weight_function}{GLM weight function.}

\item{schur_correction_function}{Schur complement correction function.}

\item{qp_score_function}{Score function for QP subproblem.}

\item{need_dispersion_for_estimation}{Logical.}

\item{dispersion_function}{Dispersion estimation function.}

\item{observation_weights}{List of observation weights.}

\item{iterate}{Logical; if FALSE, single pass (no iteration).}

\item{tol}{Convergence tolerance.}

\item{max_backfit_iter}{Integer.}

\item{parallel_eigen, cl, chunk_size, num_chunks, rem_chunks}{Parallel arguments.}

\item{schur_zero}{List of zeros (one per partition).}

\item{quadprog}{Logical; apply inequality constraint refinement if TRUE.}

\item{qp_Amat}{Inequality constraint matrix for
\code{quadprog::solve.QP}.}

\item{qp_bvec}{Inequality constraint right-hand side.}

\item{qp_meq}{Number of leading equality constraints.}

\item{Lambda}{\eqn{p_expansions \times p_expansions} penalty matrix.}

\item{L_partition_list}{List of partition-specific penalty matrices.}

\item{unique_penalty_per_partition}{Logical.}

\item{A}{Full \eqn{P \times R_constraints} constraint matrix.}

\item{constraint_values}{List of constraint right-hand sides.}

\item{Vhalf}{Square root of the working correlation matrix in the
original observation ordering.}

\item{VhalfInv}{Inverse square root of the working correlation matrix
in the original observation ordering.  When both are non-\code{NULL},
the GEE paths are used.}

\item{verbose}{Logical.}

\item{...}{Additional arguments passed to weight and dispersion functions.}
}
\value{
A named list with \code{result}, \code{beta_spline},
  \code{beta_flat}, and \code{qp_info}.
}
\description{
Stage 1 runs damped Newton-Raphson backfitting on the unwhitened link-scale working
response to produce a warm start.  Stage 2 refines via damped SQP
on the full whitened system, replicating \code{get_B} Path 1b.
}
\keyword{internal}
