NEWS.md

badp 0.6.0

The robust standard deviations that bma() reports are unaffected in the sense that they remain well defined: J vanishes outside the spanned block, so the sandwich restricted to that block equals the profile sandwich obtained by profiling the remaining parameters out. What the construction discards is the score covariance involving those remaining directions, which is set to zero rather than estimated. The likelihood, the posterior means, the posterior inclusion probabilities and the Hessian-based standard errors PSD and PSDcon do not involve J.

summary() of a model space now reports the fraction of parameter directions spanned. bma() gained an eta argument taking the learning rate directly, which overrides weighting. eta = 1 reproduces "mb2012" and eta = 1/N reproduces "mb2016", so the sensitivity of any conclusion to the rate can be examined without re-estimation. The "curvature" weighting, which estimated the learning rate by the magnitude ("omnibus") adjustment for misspecified likelihoods, has been withdrawn before release. The adjustment assumes J estimates the variance of the score, and J is rank deficient for this likelihood, so the rate would be calibrated on the small part of the parameter space the entity-level scores span, with no way to assess what the remainder contributes. Use eta to set a rate explicitly instead. The ingredients, tr(H^-1 J), dim(theta) and rank(J), remain stored with every fitted model space, so the rate can still be computed and inspected directly. * bma() gained a weighting argument selecting the approximation to the marginal likelihood used to weight the models. Writing A_j = loglik_j - (k_j/2)*log(N*T), three of the four options are the same construction with different learning rates eta, log w_j = eta * A_j: * "mb2016" (default, eta = 1/N) is unchanged behaviour, the approximation computed by the implementation accompanying Moral-Benito (2016), and the option that reproduces the posterior inclusion probabilities and posterior moments published there; * "mb2012" (eta = 1) is the Schwarz criterion exactly as stated in equations (24)-(30) of Moral-Benito (2012); * "nt" (eta = 1/(N*T)) averages over entity-periods rather than entities, the scaling that would be internally consistent with the log(N*T) penalty.

The fourth option, "uip", instead alters the penalty, using exp(loglik - (k/2)*log(N)) with the entity as the unit of information, as implied by the unit information prior of Kass and Wasserman (1995) given that the likelihood factorises over entities.

Any eta != 1 gives a tempered (power) posterior over models, which lies outside the approximation that motivates the criterion. A rate held fixed as the sample grows only rescales the log weights, so the posterior still concentrates, more slowly for eta < 1. A rate that shrinks with the sample is different in kind: under eta = 1/N the log weights converge to constants and the posterior never concentrates. Conversely eta = 1 concentrates sharply and can place nearly all posterior mass on a single model. The choice can therefore change posterior inclusion probabilities materially, and users are encouraged to check the sensitivity of their conclusions. Switching between the options requires no re-estimation, as all are recovered from the same fitted model space. The selected weighting and the realised learning rate are recorded in the new weighting and eta elements (slots 18 and 19) of badp_bma objects. Existing slots 1-17 are unchanged, so numeric indexing of earlier elements continues to work. Model weights are now formed on the log scale and shifted before exponentiation, which prevents overflow when log Bayes factors are large. coef_hist() labels the y axis "Density" rather than "Frequency", matching what the histograms actually show. sem_sigma_matrix() builds variances with multiplication rather than ^2, avoiding a NaN second derivative that automatic differentiation would otherwise produce when a variance parameter is exactly zero. sem_C_matrix() validates that phi_1 is supplied with the same length as beta. RTMB (>= 1.6) is now required, for automatic-differentiation support in chol() and determinant(). The minimum required R version was raised from 3.5 to 4.4, to match the requirement of Matrix, on which RTMB depends through TMB. The previous declaration could not be satisfied in practice. Regenerated every bundled model space (small_model_space, full_model_space, model_space_nonnested, migration_model_space and migration_model_space_nonnested) and full_bma_results with the fixed automatic differentiation pipeline. model_space_nonnested had no generating script; data-raw/model_space_nonnested.R now provides one.

badp 0.5.0

badp 0.4.0

bdsm 0.3.0

bdsm 0.2.2

bdsm 0.2.1

bdsm 0.2.0

bdsm 0.1.0



Try the badp package in your browser

Any scripts or data that you put into this service are public.

badp documentation built on Aug. 20, 2026, 9:08 a.m.