src/compute_sufficient_stats_cpp.cpp: replace std::memcpy on
y.memptr() with the arma::mat(arma::vec) copy constructor.
When called with an empty vector (n == 0), the previous
implementation invoked std::memcpy(NULL, NULL, 0), which is
undefined behavior per the C standard even though no bytes are
copied. gcc-UBSAN on the CRAN Fedora tests-gcc-SAN farm reports
this as runtime error: null pointer passed as argument 1, which is declared to never be null. The new implementation uses
Armadillo's own copy constructor, which handles the n == 0 case
internally without dereferencing any pointer. No user-visible
behavior change and no numerical change; a defensive fix for a
latent memory-safety issue that only triggered in the empty-input
edge case exercised by test-defensive-branches.R.Addresses a follow-up NOTE from win-builder R-devel on cevcmm 0.1.2 asking that arXiv preprints be cited via their arXiv DOI form rather than the plain URL form. Metadata-only change; no code changes.
<https://arxiv.org/abs/2511.12732> to
<doi:10.48550/arXiv.2511.12732>, as required by CRAN policy for
arXiv preprints.Addresses comments from CRAN reviewer Konstanze Lauseker on the initial submission of cevcmm 0.1.1.
\value sections to the fixef and ranef S3
generic function documentation, describing the return-value
contract dispatched to method-specific documentation.\dontrun{} to \donttest{} in the
plot.vcmm_fit example.inst/validation and inst/benchmarks
from the CRAN tarball. These are development-time scripts (the
Day 7-18 validation harness and micro-benchmarks used during
package development) that write files and change
par() / options() without resetting. They remain available in
the GitHub repository for reference but are no longer shipped
to CRAN users.PKG_LIBS = $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS) to
src/Makevars for BLAS / LAPACK / Fortran linking on Linux. The
equivalent flags were already present in src/Makevars.win for
Windows. Fixes install failure with undefined symbol: dpotrf_
on CRAN's Debian pretest.First public release.
vcmm() is the main entry point: a single call that builds the spline
design, computes sufficient statistics, and fits a Varying Coefficient
Mixed-Effects Model. The default method = "auto" routes between the
iterative sufficient-statistics estimator (SS) and the one-step
communication-efficient surrogate-likelihood estimator (CSL) of
Jalili and Lin (2025), based on the problem size.Three structures, all selectable via re_cov:
re_cov = "diag": independent random effects with shared variance
$\sigma_\alpha^2$.re_cov = "kronecker": $\Sigma_\alpha = \Sigma_{\text{left}} \otimes
\Sigma_{\text{right}}$, with $\Sigma_{\text{left}}$ (q_left x
q_left) estimated and $\Sigma_{\text{right}}$ (G x G) held at
its initial value. Designed for origin-destination flow data.re_cov = "separable": same internal Kronecker machinery as the
kronecker mode, but with the q_left argument required (no default)
and the right-side $\Omega_G$ held fixed at its initial value.node_summary() computes a sufficient-statistics summary on a slice
of data; the resulting vcmm_ss object is independent of the slice
size (a few KB regardless of $n_k$) and can be shipped between
machines.+.vcmm_ss adds summaries together; Reduce("+", list_of_summaries)
aggregates an arbitrary number.init_accumulator() plus repeated calls to accumulate_stats()
provides a streaming alternative for chunks that arrive over time.fit_from_summaries() accepts a single summary, a list of summaries,
or an accumulator, and returns a fit bit-equivalent to a pooled
vcmm() call on the same data (Theorem 1 of Jalili and Lin, 2025).rowSums(Z) (e.g. origin-destination
indicators), fit_from_summaries() takes a rowsum_constant
argument so the same identifiability shift vcmm() applies
automatically can be reproduced in the distributed setting.Standard generics work on the vcmm_fit class: print(), summary(),
coef(), fixef(), ranef(), vcov(), nobs(), logLik(), AIC(),
BIC(), predict(), plot(), plus the package-specific helper
varying_coef() for evaluating $\hat\beta_k(t)$ at new $t$ values.
vcov() returns the asymptotic Wald variance from the prior-augmented
Hessian inverse. which = "beta" (default), "alpha", or "both".predict() supports both subject-specific (with Z) and marginal
predictions, with optional pointwise standard errors via se.fit.varying_coef() evaluates $\hat\beta_k(t)$ on an arbitrary grid with
optional pointwise standard errors.plot.vcmm_fit() shows three diagnostic panels (which = 1, 2, 3):
varying coefficient with CI band; residuals vs fitted and vs $t$;
random-effect diagnostics that adapt to the chosen re_cov (Q-Q
plot for diag, heatmap of the estimated $\Sigma_{\text{left}}$ for
kronecker and separable).Suggests:), enabled
with options(cevcmm.use_rspectra = TRUE) for the dense
high-dimensional case.inst/extdata/od_migration.csv: a 3000-row simulated origin-destination
migration dataset (10 regions over 30 years, all 100 OD pairs observed
annually). Used by the od-migration vignette.getting-started — simulate, fit, and inspect on a simple
diagonal-random-effects example.distributed-fitting — split data across multiple nodes and recover
the same fit; covers both list-of-summaries and streaming-accumulator
patterns.od-migration — Kronecker covariance for origin-destination flow data
using the bundled CSV example.Jalili, L. and Lin, L.-H. (2025). Scalable and Communication-Efficient Varying Coefficient Mixed Effect Models: Methodology, Theory, and Applications. arXiv:2511.12732; under review at Journal of the American Statistical Association.