Changelog
Source:NEWS.md
spikeyglass 0.1.0
PIP collapse (pi handling in the EM)
A diagnostic of the PIP collapse seen in the DiNA simulation is in data-raw/pip-collapse-diagnostic.md. It was caused by ladders ending at a small lambda1/v0 (e.g. 16): an edge needs roughly sum_g |theta_g| > (G log r - logit(pi)) / (r - 1), r = lambda1/v0, to reach PIP 0.5. Below that bar the pi update shrinks pi, which raises the bar again. The following changes make the EM robust to this and make it visible:
- pi_delta and pi_xi are kept inside
[1/N, 1 - 1/N],N = p(p-1)/2. pi_xi could previously reach exactly 0 and stay there (log(0)in the E-step), soproblist2was identically 0. - EM convergence now also requires the change in
log(pi)to be below the newtol.pi(default 1e-3). Checking theta alone could stop a ladder step while pi was still falling by orders of magnitude per iteration. -
ssjgl()warns when the last ladder step has no edge with PIP > 0.5 or pi_delta is at its floor. - New
carry_pi = FALSE. IfTRUE, pi starts each ladder step from the previous step’s value instead of the prior mean. -
?ssjglgains a section on what the PIPs are (EM conditional probabilities that rank edges, not calibrated posterior probabilities) and on the collapse condition.
For fits that did not collapse, the final estimates are unchanged (to 1e-14 on the reference fits); some first ladder steps take one iteration more or fewer.
CRAN preparation
-
ssjgl()gainsverbose = FALSE. Progress (each EM iteration on the R path, each ladder step, re-initialisation notices) is reported withmessage()only whenverbose = TRUE. It was printed unconditionally withcat().SSJGL_select_v0_cv(),SSJGL_final_with_pcor_CI()andSSJGL_CV_final_pcorCI()now default toverbose = FALSEand usemessage(). -
simulate_ssjgl_data(),SSJGL_select_v0_cv()andSSJGL_final_with_pcor_CI()no longer change the caller’s random-number stream: the RNG state is restored on exit after usingseed. -
plot_path()restorespar()on exit, has dead code removed, and its example now runs. Its legend now says what is drawn (the old “Edge” / “Non-edge” legend referred to a true graph the function never had). -
simdatis regenerated reproducibly withsimulate_ssjgl_data()(data-raw/simdat.R) and now also contains the true precision matrices (Omega). The previous version came from a script that could not be run. - The unused
fit1.Rdatafiles are removed, so the package no longer depends on R >= 3.5.0 through serialized data. It now depends on R >= 4.1.0. - New
inst/CITATION(method paper and package),CITATION.cffandcran-comments.md. The DESCRIPTION has a fuller description citing Li et al. (2019),BugReports, and the GitHub URL. The Title is in title case. - GitHub Actions: R CMD check on macOS, Windows and Ubuntu (devel, release, oldrel-1), plus test coverage.
- The profiling script moved from
inst/profiling/toscripts/(not installed).