bfPPalpha {ppRep}R Documentation

Bayes factor for testing power parameter

Description

This function computes the Bayes factor contrasting H_1\colon \alpha = 1 to H_0\colon \alpha < 1 for the replication data assuming a normal likelihood. The power parameter \alpha indicates how much the normal likelihood of the original data is raised to and then incorporated in the prior for the effect size \theta (e.g., for \alpha = 0 the original data are completely discounted). Under H_0, the power parameter can either be fixed to 0, or it can have a beta distribution \alpha | H_0 \sim \mbox{Beta}(1, \code{y}). For the fixed power parameter case, the specification of an unit-information prior \theta \sim \mathrm{N}(0, \code{uv}) for the effect size \theta is required as the prior is otherwise not proper.

Usage

bfPPalpha(tr, sr, to, so, y = 2, uv = NA, ...)

Arguments

tr

Effect estimate of the replication study.

sr

Standard error of the replication effect estimate.

to

Effect estimate of the original study.

so

Standard error of the replication effect estimate.

y

Number of failures parameter for beta prior of power parameter under H_0. Has to be larger than 1 so that density is monotonically decreasing. Defaults to 2 (a linearly decreasing prior with zero density at 1). Is only taken into account when uv = NA.

uv

Variance of the unit-information prior for the effect size that is used for testing the simple hypothesis H_0 \colon \alpha = 0. Defaults to NA.

...

Additional arguments passed to stats::integrate.

Value

Bayes factor (BF > 1 indicates evidence for H_0, whereas BF < 1 indicates evidence for H_1)

Author(s)

Samuel Pawel

See Also

bfPPtheta

Examples

## use unit variance of 2
bfPPalpha(tr = 0.09,  sr = 0.0518, to = 0.205, so = 0.0506, uv = 2)

## use beta prior alpha|H1 ~ Be(1, y = 2)
bfPPalpha(tr = 0.09,  sr = 0.0518, to = 0.205, so = 0.0506, y = 2)

[Package ppRep version 0.42.3 Index]