| fit_csl | R Documentation |
Performs a single Newton refinement of a pilot estimator using the aggregated sufficient statistics, implementing the one-step communication-efficient surrogate-likelihood (CSL) estimator of Jalili and Lin (2025, Section 3). For the normal linear VCMM the update is
\widehat{\theta}_{CSL}
= \widehat{\theta}_0
- K^{-1} \, g(\widehat{\theta}_0),
where \theta = (\beta, \alpha), the gradient g uses the
full aggregated stats, and the Hessian K also uses the full
aggregated stats with prior augmentation. Theorem 3.1 of the paper
shows that whenever the pilot estimator is \sqrt{N}-consistent,
the one-step CSL estimator is first-order equivalent to the full SS
estimator.
fit_csl(
stats,
penalty,
control = vcmm_control(),
pilot = NULL,
pilot_max_iter = 5L,
pilot_tol_beta = 0.001,
pilot_tol_alpha = 0.001,
re_cov_state = NULL
)
stats |
A |
penalty |
A symmetric |
control |
A |
pilot |
Optional |
pilot_max_iter |
Integer. Maximum iterations for the internal
SS pilot (default 5). Ignored if |
pilot_tol_beta |
Positive numeric. Loose tolerance for the
internal SS pilot (default 1e-3). Ignored if |
pilot_tol_alpha |
Positive numeric. Loose tolerance for the
internal SS pilot (default 1e-3). Ignored if |
re_cov_state |
Optional. An internal random-effects covariance
state object (NULL for diagonal, or constructed for kronecker via
|
Pilot estimator. If pilot = NULL (default), an
internal SS pilot is run with loose tolerances and a small number of
iterations (pilot_max_iter = 5, pilot_tol_beta = 1e-3,
pilot_tol_alpha = 1e-3); these defaults match the dense
simulation study of the paper. Setting pilot_max_iter = 1L
gives the cheapest possible pilot (the OLS-like single-step pilot
used in the origin-destination simulation), still
\sqrt{N}-consistent in the normal linear case. Advanced users
may pass any vcmm_fit object via the pilot argument –
e.g. a previously fitted fit_ss() result.
Hessian. This implementation uses the full aggregated
Hessian, not the reference-node curvature approximation \tilde K
from the paper. The two are first-order equivalent under the
conditions of Theorem 3.1; the full-aggregated form is the most
accurate and is the natural default for a single-server fit, which
is the typical use case of this package.
A list of class "vcmm_fit" with the same fields as
fit_ss(), plus:
pilot: the vcmm_fit pilot used.
pilot_elapsed_sec: pilot fitting time.
step_elapsed_sec: Newton step time.
The method field is "CSL".
Jalili, L. and Lin, L.-H. (2025). Scalable and Communication-Efficient Varying Coefficient Mixed-Effects Models.
set.seed(1)
n <- 500; p <- 4; q <- 3
X <- cbind(1, matrix(rnorm(n * (p - 1)), n, p - 1))
Z <- matrix(rnorm(n * q), n, q)
alpha_true <- rnorm(q, sd = 0.5)
y <- as.vector(
X %*% c(2, 0.5, -0.3, 0.8) + Z %*% alpha_true + rnorm(n, sd = 0.5)
)
stats <- compute_sufficient_stats(y, X, Z)
P <- build_penalty_matrix(n_basis = p - 1, lambda = 0.1)
# Default: internal SS pilot (5 loose iterations) then one Newton step
fit <- fit_csl(stats, P,
vcmm_control(sigma_eps = 0.5, sigma_alpha = 0.5))
fit
# Cheapest pilot: single SS step
fit_one <- fit_csl(stats, P,
vcmm_control(sigma_eps = 0.5, sigma_alpha = 0.5),
pilot_max_iter = 1L)
# Advanced: user-supplied pilot
my_pilot <- fit_ss(stats, P,
vcmm_control(sigma_eps = 0.5, sigma_alpha = 0.5,
max_iter = 3))
fit_user <- fit_csl(stats, P,
vcmm_control(sigma_eps = 0.5, sigma_alpha = 0.5),
pilot = my_pilot)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.