This release fixes a long-standing error in how the prior degrees of freedom
(upsilon) were used. Results from pibble(), basset() and orthus()
fitted with earlier versions may change; please refit.
fido fits models in two steps. It first finds Eta using a "collapsed" model in
which Lambda and Sigma have been integrated out. It then draws Lambda and
Sigma given Eta (the "uncollapse" step). Both steps should use the same
inverse-Wishart prior on Sigma, with upsilon degrees of freedom.
The collapsed step expects its degrees of freedom on a different scale (the
matrix-t scale). Converting the inverse-Wishart upsilon to that scale requires
subtracting D - 2. Since 2018, pibble() passed upsilon to the collapsed
step without this conversion. The collapsed step therefore used a prior on
Sigma that was more informative than the one requested. The uncollapse step
used the correct prior, so the two steps did not agree.
pibble() and basset() (including additive basset() models) with three or
more categories (D > 2). With D = 2 the two scales coincide and results are
unchanged. The larger D is relative to upsilon, the larger the effect.orthus() in all cases, because it had a similar conversion error (upsilon + P
was used where upsilon - D + 2 is correct).maltipoo() (experimental) received the same fix.logMarginalLikelihood) was missing several constant terms and is now
correctly normalized. Stored values from earlier versions (for any D) should
not be compared with new ones.pibble(), basset(), orthus() and maltipoo() now stop with an error if
upsilon is too small for a valid inverse-Wishart prior (upsilon <= D-2,
or upsilon <= D+P-2 for orthus()). Previously such values were accepted
silently and produced meaningless fits.orthus_sim(true_priors = FALSE) now returns upsilon = D+P (previously D,
which is not a valid prior for the (D-1+P)-dimensional covariance).orthus_sim(true_priors = TRUE) now uses upsilon = D+P+10 so the
inverse-Wishart prior mean equals the simulated Sigma, including with
the default dimensions. Previously the scale was zero or negative when
P >= 10.orthus_sim() now preserves matrix dimensions with two categories or a
single Gaussian variable, sample, or covariate. Invalid dimensions are
rejected before simulation, and its fixed covariance entry no longer makes
the simulated covariance singular when both corresponding variances are one.upsilon was silently rounded down when drawing Sigma; it is
now used as given.ret_mean = TRUE now errors when upsilon + N is too small for the
conditional posterior mean of Sigma to exist. Use posterior draws
(ret_mean = FALSE) with these proper, heavy-tailed posteriors.basset() with more than one component (lists of Theta and Gamma) passed
ncores into the ret_mean slot of the component sampler. When ncores was
set this could return component means instead of posterior draws, and the
seed and ncores settings were ignored. Arguments are now passed by name,
and each component uses its own random stream, so component uncertainty is
now correct.fido_build_info() to report native runtime threading configuration and
compiler support for OpenMP, Eigen, and MKL._R_CHECK_LIMIT_CORES_=TRUE for package checks.--configure-args="--with-mkl" on supported Linux x86_64 systems, with automatic
thread safety guards during parallel uncollapsing.LaplaceApproximation to verify Cholesky factor status
and preserve block-diagonal partial Hessian handling when MKL is disabled.upsilon
after the fact; predictions from old fit objects reflect the old results.upsilon argument has not changed: it is the standard
inverse-Wishart degrees of freedom. For pibble() and basset(), the prior
mean of Sigma is Xi / (upsilon - D) when upsilon > D. For orthus(),
it is Xi / (upsilon - D - P) when upsilon > D + P. Existing scripts need
no edits.optimPibbleCollapsed(),
loglikPibbleCollapsed(), gradPibbleCollapsed() or hessPibbleCollapsed()
directly, note that they take matrix-t degrees of freedom. Pass
upsilon - D + 2 rather than upsilon (see their help pages).
uncollapsePibble() still takes upsilon unchanged.Sigma returned by uncollapsePibble(..., ret_mean = TRUE) to use the correct inverse-Wishart mean.ncores for a fixed seed and no longer depend on overlapping thread RNG streams.seq_len() and seq_along() for improved robustness.bug fixes
bug fixes
bug fixes
bug fixes
More changes to make the final push for CRAN! Changes include:
mallard and mallard_family
rather than both importing as ps. Solved a R CMD CHECK warning.NEWS.md file to track changes to the package.