User Tools

Site Tools


manual:mediation02

Sample size determination for testing mediation with the mediation Bayes factor

Note that the method is based on Monte Carlo simulation. It can take a while to run. Wait for the program to complete and DO NOT refresh.

The model

The simple mediation model (standardized) is written as:

$$ M = a*X + e_m $$

$$ Y = c'*X + b*M + e_y $$

$a$: coefficient of the independent variable (X) in the mediator (M) model $b$: coefficient of the mediator (M) in the outcome (Y) model The mediation effect is quantified as $a*b$.

Input parameters

  • Sample size. The sample size determination (SSD) procedure starts from an initial, guessed sample size (e.g., 50; a small value). If with this initial sample size, power is lower than the desired power level, the SSD procedure will continue to increase the sample size (by an increment of “Sample size interval”), until the sample size is large enough for reaching the desired power level, or unitl the sample size reaches the “Maximum sample size” specified by the user.
    • Initial sample size: The initial sample size to be considered in the sample size determination procedure (default 50)
    • Maximum sample size: the maximum sample size to be considered in the sample size determination procedure (default 500)
    • Sample size interval: a integer specifying the increment in sample size between consecutive rounds of the sample size determination procedure (default 10)
  • Path a: Standardized path coefficient of the a-path if the a-path is truly present (i.e., non-zero, default 0.39)
  • Path b: Standardized path coefficient of the b-path if the b-path is truly present (i.e., non-zero, default 0.39)
  • Path c: Standardized path coefficient of the c'-path (default 0)
  • Prior odds specification can be provided in three ways. Can select the option using the drop down menu.
    • Provide Prior Odds for path a and path b (default 1 and 1)
    • Provide Prior Odds for the mediation effect a*b and path a (default 1 and 2.4142)
    • Provide Prior Odds for the mediation effect a*b and path b (default 1 and 2.4142)
  • Significance level: Type I error rates for determining the mediation Bayes factor cutoff (default 0.05). Note that the Type I error rate refers to the probability that the mediation Bayes factor exceeds the cutoff when the null hypothesis [i.e., mediation is absent] is true.
  • Power: Desired power value (default 0.8). Note that Power refers to the probability that the mediation Bayes factor exceeds the cutoff when the alternative hypothesis [i.e., mediation is present] is true.
  • Number of simulation: the number of simulated samples for constructing the distribution of mediation Bayes factor under each of the competing hypotheses (i.e., the null and the alternative hypotheses). Default 1000, recommended 10,000.
  • Random number seed: random number seed used for replication purpose (default 2022).
manual/mediation02.txt · Last modified: 2024/09/19 12:24 (external edit)