0
$\begingroup$

I have data from an experiment that records the effects of stress on blood pressure.

The study went as follows:

  1. Participants had their blood pressure measured 4 times over ten minutes to assess their baseline blood pressure.
  2. Participants underwent a psychological stress task for 6 minutes, yielding 3 measures.
  3. Participants were assessed 4 times after the stress task to assess how they recovered from the stress task.

I've been asked to try to use piece-wise growth curve models to understand the effects of a predictor X on the stress phase and recovery phase of the study. I'm using R to do so.

However, I'm confused on how to code time for this.

Do I dummy code it to be like this where 1 indicates when we're in the baseline, stress, and recovery phases like this:

Baseline Stress Recovery
1 0 0
1 0 0
1 0 0
1 0 0
0 1 0
0 1 0
0 1 0
0 0 1
0 0 1
0 0 1
0 0 1

Or something like this where time is always incrementing?

Baseline Stress Recovery
0 0 0
1 0 0
2 0 0
3 0 0
3 1 0
3 2 0
3 3 0
3 3 1
3 3 2
3 3 3
3 3 4

Would really appreciate any help as I'm very stuck and confused.

$\endgroup$

1 Answer 1

1
$\begingroup$

One simple solution, if you have a reasonably small series of defined time points like this, is just to have a single time variable representing all of the time points. It might make sense to use the first blood pressure (BP) value as a covariate, modeling the 10 subsequent BP values with a single growth-curve model that treats time points as levels of a factor.

Growth-curve modeling can be implemented by the gls() function in the R nlme package. Chapter 7 of Frank Harrell's course notes or book illustrate the approach, with the Gls() wrapper function of his rms package.

Before you see the results, use your knowledge of the subject matter to decide on particular comparisons among time points of interest. For example, as a non-expert I would wonder: do any of the subsequent 3 pre-task BP values differ from the initial value or each other? Do any of the during-task values differ from the pre-task values? Do the 3 during-task values differ from each other? Do the 4 post task values differ from the last during-task value, or from each other?

After you have the model, plot the modeled BP estimates (with confidence intervals) versus time. Label the time axis according to the corresponding part of the experiment. That would be your primary display.

Then interrogate the model for your pre-specified comparisons of interest. That can be done for example with tools provided in the rms package or with the emmeans package.

The problem with only 3 or 4 time points within each phase of the experiment is that you can't count on linear changes over time within each phase but you don't have enough time points within each phase to do very flexible modeling. That's why I recommend modeling all the individual time points without any assumption about the form of time courses, and then evaluating the specific differences of primary interest.

$\endgroup$
1
  • $\begingroup$ Thank you that's really helpful!! I'll try do it that way. $\endgroup$ Commented Jul 28, 2022 at 18:59

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.