bfPPtheta {ppRep}R Documentation

Bayes factor for testing effect size

Description

This function computes the Bayes factor contrasting H_0\colon \theta = 0 to H_1\colon \theta \sim f(\theta | \code{to}, \code{so}, \alpha) for the replication data assuming a normal likelihood. The prior of the effect size \theta under H_1 is the posterior of the effect size obtained from combining a normal likelihood of the original data raised to the power of \alpha with a flat initial prior with a. Under H_1, the power parameter can either be fixed to some value between 0 and 1, or it can have a beta distribution \alpha | H_1 \sim \mbox{Beta}(\code{x}, \code{y}).

Usage

bfPPtheta(tr, sr, to, so, x = 1, y = 1, alpha = 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.

x

Number of successes parameter for beta prior of power parameter under H_1. Defaults to 1. Is only taken into account when alpha = NA.

y

Number of failures parameter for beta prior of power parameter under H_1. Defaults to 1. Is only taken into account when alpha = NA.

alpha

Power parameter under H_1. Can be set to a number between 0 and 1. 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

bfPPalpha

Examples

## uniform prior on power parameter
bfPPtheta(tr = 0.09,  sr = 0.0518, to = 0.205, so = 0.0506)

## power parameter fixed to alpha = 1
bfPPtheta(tr = 0.090, sr = 0.0518, to = 0.205, so = 0.0506, alpha = 1)

[Package ppRep version 0.42.3 Index]