plus_pmp_from_pmp: Posterior probability of a positive coefficient sign (P(+))

View source: R/plus_pmp_from_pmp.R

plus_pmp_from_pmpR Documentation

Posterior probability of a positive coefficient sign (P(+))

Description

Computes posterior probabilities of a positive coefficient sign, P(+), for the intercept and each regressor by averaging model-specific probabilities across the model space, weighted by posterior model probabilities.

Usage

plus_pmp_from_pmp(pmp_uniform, pmp_random, betas, VAR, DF, Reg_ID)

Arguments

pmp_uniform

Numeric vector of length MS containing posterior model probabilities under a uniform model prior.

pmp_random

Numeric vector of length MS containing posterior model probabilities under a random model prior.

betas

Numeric matrix of dimension MS x (K+1) containing estimated coefficients for each model. Column 1 corresponds to the intercept, columns 2 to K+1 correspond to regressors.

VAR

Numeric matrix of dimension MS x (K+1) containing variances of the coefficient estimates. Must have the same dimensions as betas.

DF

Numeric vector of length MS containing the degrees of freedom associated with each model.

Reg_ID

Numeric or integer matrix of dimension MS x K indicating regressor inclusion. Entry Reg_ID[i, k] = 1 if regressor k is included in model i, and 0 otherwise.

Details

For a given model i and coefficient j, the contribution is

p(M_i \mid y) \cdot F_t\!\left( \frac{\beta_{ij}}{\sqrt{\mathrm{VAR}_{ij}}}; \mathrm{DF}_i \right),

where F_t(\cdot;\mathrm{DF}_i) is the CDF of the Student-t distribution with \mathrm{DF}_i degrees of freedom.

The intercept is included in all models, while each regressor contributes only in those models in which it is included, as indicated by the model inclusion matrix Reg_ID.

The posterior probability of a positive sign for coefficient j is computed as

P(\beta_j > 0 \mid y) = \sum_{i \in \mathcal{M}_j} p(M_i \mid y)\, F_t\!\left( \frac{\beta_{ij}}{\sqrt{\mathrm{VAR}_{ij}}}; \mathrm{DF}_i \right),

where \mathcal{M}_j denotes the set of models that include regressor j. For the intercept, \mathcal{M}_j contains all models.

This definition follows the sign-probability interpretation in Doppelhofer and Weeks (2009).

Value

A list with two elements:

Plus_PMP_uniform

A (K+1) x 1 numeric matrix containing posterior probabilities of a positive coefficient sign under the uniform model prior. The first row corresponds to the intercept.

Plus_PMP_random

A (K+1) x 1 numeric matrix containing posterior probabilities of a positive coefficient sign under the random model prior. The first row corresponds to the intercept.

References

Doppelhofer, G. and Weeks, M. (2009). Jointness of growth determinants. Journal of Applied Econometrics, 24(2), 209–244.


rmsBMA documentation built on March 14, 2026, 5:06 p.m.