Correction for meta-analysis with multiple biases

## Usage

```
multibias_meta(
yi,
vi,
sei,
cluster = 1:length(yi),
biased = TRUE,
selection_ratio,
bias_affirmative,
bias_nonaffirmative,
favor_positive = TRUE,
alpha_select = 0.05,
ci_level = 0.95,
small = TRUE,
return_worst_meta = FALSE,
return_pubbias_meta = FALSE
)
```

## Arguments

- yi
A vector of point estimates to be meta-analyzed.

- vi
A vector of estimated variances (i.e., squared standard errors) for the point estimates.

- sei
A vector of estimated standard errors for the point estimates. (Only one of

`vi`

or`sei`

needs to be specified).- cluster
Vector of the same length as the number of rows in the data, indicating which cluster each study should be considered part of (defaults to treating studies as independent; i.e., each study is in its own cluster).

- biased
Boolean indicating whether each study is considered internally biased; either single value used for all studies or a vector the same length as the number of rows in the data (defaults to all studies).

- selection_ratio
Ratio by which publication bias favors affirmative studies (i.e., studies with p-values less than

`alpha_select`

and estimates in the direction indicated by`favor_positive`

).- bias_affirmative
Mean internal bias, on the additive scale, among published affirmative studies. The bias has the same units as

`yi`

.- bias_nonaffirmative
Mean internal bias, on the additive scale, among published nonaffirmative studies. The bias has the same units as

`yi`

.- favor_positive
`TRUE`

if publication bias are assumed to favor significant positive estimates;`FALSE`

if assumed to favor significant negative estimates.- alpha_select
Alpha level at which an estimate's probability of being favored by publication bias is assumed to change (i.e., the threshold at which study investigators, journal editors, etc., consider an estimate to be significant).

- ci_level
Confidence interval level (as proportion) for the corrected point estimate. (The alpha level for inference on the corrected point estimate will be calculated from

`ci_level`

.)- small
Should inference allow for a small meta-analysis? We recommend always using

`TRUE`

.- return_worst_meta
Boolean indicating whether the worst-case meta-analysis of only the nonaffirmative studies be returned.

- return_pubbias_meta
Boolean indicating whether a meta-analysis correcting for publication but not for confounding be returned.

## Value

An object of class `metabias::metabias()`

, a list containing:

- data
A tibble with one row per study and the columns

`yi`

,`vi`

,`sei`

,`biased`

,`cluster`

,`affirmative`

,`yi_adj`

,`weight`

,`userweight`

.- values
A list with the elements

`selection_ratio`

,`bias_affirmative`

,`bias_nonaffirmative`

,`favor_positive`

,`alpha_select`

,`ci_level`

,`small`

.- stats
A tibble with the columns

`model`

,`estimate`

,`se`

,`ci_lower`

,`ci_upper`

,`p_value`

.- fit
A list of fitted models.

## References

Mathur MB (2022). “Sensitivity analysis for the interactive effects of internal bias and publication bias in meta-analyses.” doi:10.31219/osf.io/u7vcb .

## Examples

```
# publication bias without internal bias
meta_0 <- multibias_meta(yi = meta_meat$yi,
vi = meta_meat$vi,
selection_ratio = 4,
bias_affirmative = 0,
bias_nonaffirmative = 0)
meta_0$stats
#> model estimate se ci_lower ci_upper p_value
#> 1 multibias 0.1293691 0.02103083 0.08711307 0.1716251 1.335523e-07
# publication bias and internal bias in the non-randomized studies
meta_4 <- multibias_meta(yi = meta_meat$yi,
vi = meta_meat$vi,
biased = !meta_meat$randomized,
selection_ratio = 4,
bias_affirmative = log(1.5),
bias_nonaffirmative = log(1.1))
meta_4$stats
#> model estimate se ci_lower ci_upper p_value
#> 1 multibias 0.09491905 0.02405073 0.04662505 0.1432131 0.0002453537
# treat all studies as biased, not just non-randomized ones
meta_all <- multibias_meta(yi = meta_meat$yi,
vi = meta_meat$vi,
biased = TRUE,
selection_ratio = 4,
bias_affirmative = log(1.5),
bias_nonaffirmative = log(1.1))
meta_all$stats
#> model estimate se ci_lower ci_upper p_value
#> 1 multibias 0.01020086 0.02103083 -0.03205518 0.0524569 0.6297933
```