Learn R Programming

psycho (version 0.4.91)

mpe: Compute Maximum Probability of Effect (MPE).

Description

Compute the Maximum Probability of Effect (MPE), i.e., the proportion of posterior distribution that is of the same sign as the median. In other words, it corresponds to the maximum probability that the effect is different from 0 in the median<U+00E2><U+20AC><U+2122>s direction.

Usage

mpe(posterior)

Arguments

posterior

Posterior Distribution.

Value

list containing the MPE and its values.

Examples

Run this code
# NOT RUN {
library(psycho)
library(rstanarm)

fit <- rstanarm::stan_glm(rating ~ advance, data = attitude)
posterior <- psycho::analyze(fit)$values$effects$advance$posterior
mpe <- psycho::mpe(posterior)
print(mpe$MPE)
print(mpe$values)
# }

Run the code above in your browser using DataLab