rmultilevel-analysis

Mediation package R - continuous treatment variable: How to define treatment and control values?


I am running a (multilevel) mediation analysis with a binary outcome variable, a continuous mediator variable (given in z-scores) and a continuous treatment variable (also given in z-scores) with the mediate() function in R. According to the package's authors, in case of continuous treatment variables, one has to define both a value of the treatment variable (i.e., treat.value) and a value for the control variable (i.e., control.value) which would be contrasted against each other. How should these values be defined in case I really want to treat the treatment variable as a continuous variable (i.e., not having two experimental conditions which I would like to compare).

I would be very happy about any of your suggestions!


Solution

  • As the mediation package vignette says on page 13, from a continuous treatment variable, you can select the specific contrasts of interest:

    Here, instead of using the binary treat variable, we use a variable named cond, which records which of the four conditions the subject was randomly exposed to. Using the control.value and treat.value options, the user can calculate the specific contrast of interest. For example, the comparison between the second and third conditions can be done with the following code.

    What the contrast of interest is depends fully on your research question and the theory in your domain, however, a suggestion would be to compare the two most extreme ends of your continuous treatment variable. For example, if your treatment was anxiety levels measured with scores from 1 to 5, it might make most sense to specify those with no anxiety (1) and those with high anxiety (5) as your contrasts.