# ev.combo: Calculates the posterior probability of hypotheses for... In BayesCombo: Bayesian Evidence Combination

## Description

The function takes multiple effect sizes and a their standard errors and calculates the posterior probability for each hypothesis (H<: the effect size is less than 0, H0: the effect size is zero, or H>: the effect size is greater than zero).

## Usage

 ```1 2 3``` ```ev.combo(beta, se.beta, beta0 = 0, ci = 99, H0 = c(0, 0), scale = FALSE, H.priors = rep(1/3, 3), se.mult = 1, adjust = FALSE, epsilon = 1e-06, adj.factor = 1e-04, ...) ```

## Arguments

 `beta` Effect size. `se.beta` Standard error for the effect. `beta0` A prior value for the effect size. Default is zero. `ci` Is used to calculate the prior standard error if ```se0 = NULL```. The default value of 99 calculates the prior standard error so that the 99 largest (furthest from zero) confidence interval of the data distribution. `H0` A vector of length two that defines the null hypothesis. If the values are identical (e.g. `H0 = c(0,0)`) a point null is used, otherwise the null is defined as the range between the lower and upper value. `scale` Logical. Whether to scale the effect size by its standard error. Standardising has no effect on the calculations but standardised effect sizes may be easier to compare in a forest plot. `H.priors` Prior hypothesis probabilities; default is an equal probability of 1/3, and they are specified in the following order: `H<0`, `H=0`, `H>0`. `se.mult` Standard error multiplier used to increase or decrease the prior SE and used in conjunction with `ci` when `se0 = NULL`. `adjust` Logical. Whether to adjust very small posterior hypothesis probabilities. Adjusting prevents a single study from having too much influence on the results when combining multiple studies. For example, if the probability for a hypothesis from one study is zero, then additional studies cannot alter this probability (multiplying anything by zero is still zero). `epsilon` A small value that a posterior hypothesis probability must fall below before an adjustment is made. Ignored if `adjust = FALSE`. `adj.factor` A small number added to each posterior hypothesis probability if `adjust = TRUE` and one of the posterior hypothesis probabilities is less than `epsilon`. The PPHs are then re-scaled to sum to one. `...` Options to be passed to `pph()`.

## Details

This function calls `pph()` once for each study to be combined, where the posterior probabilities for one study are used as the priors for the next study. One exeption is that values for `se0` are ignored as they are calculated automatically.

## Value

Object of class `EV` which contains a matrix of posterior probabilities for each updated step and other calculated values.

## Examples

 ```1 2 3 4``` ```x <- ev.combo(beta = c(0.0126, 5.0052, 1.2976, 0.0005), se.beta = c(0.050, 2.581, 2.054, 0.003) ) x plot(x) ```

### Example output

```\$N
[1] 4

\$beta
[1] 0.0126 5.0052 1.2976 0.0005

\$se.beta
[1] 0.050 2.581 2.054 0.003

\$beta0
[1] 0

\$ci
[1] 99

\$se0
[1] 0.054891628 4.524141183 2.557760089 0.003194112

\$post.b
[1] 0.0068863267 3.7761854488 0.7888704577 0.0002656537

\$post.se
[1] 0.036963964 2.241836541 1.601521846 0.002186725

\$H.priors
[1] 0.3333333 0.3333333 0.3333333

\$pph.uniform
H<        H0        H>
[1,] 0.24634242 0.4218744 0.3317831
[2,] 0.03701135 0.1962903 0.7666984
[3,] 0.18224933 0.4142836 0.4034671
[4,] 0.26183241 0.4202804 0.3178872

\$pphs
H<        H0        H>
[1,] 0.333333333 0.3333333 0.3333333
[2,] 0.246342420 0.4218744 0.3317831
[3,] 0.026327856 0.2391241 0.7345480
[4,] 0.011988711 0.2475211 0.7404902
[5,] 0.009163464 0.3036793 0.6871573

attr(,"class")
[1] "EV"
```

BayesCombo documentation built on May 29, 2017, 10:21 a.m.