Hi all,

I have data from 25 subjects, who are divided into 3 groups (healthy subjects, mild patients and severe patients). Each subject performed an inspiratory loading test that consisted in breathing against 6 different loads (requiring increasing effort) of 0, 12, 24, 36, 48 and 60 % of subject's maximum pressure. Several continuous outcome measures were taken from each subject at the different loads. All outcome measures are expected either to increase o decrease linearly with increasing load. So, I have a between-subject factor (group) and a within-subject (repeated measures) factor (load). I want to implement a mixed effect model for each outcome measure. Since different subjects have different starting values of the outcome variable and different increasing/decreasing rates (slopes) over loads, I have defined a mixed model with random intercepts and random slopes in R using the lme function (nlme package), as follows:

outcome measure ~ load * group + ( 1 + load | subject)

I don't know whether use load as a categorical factor (levels L0, L1, L2, L3, L4 and L5) or as a continuous variable (0, 12, 24, 36, 48 and 60). In my study it is important to check for between-group differences at the different loads, so I my first option is using load as a factor. However, I am unsure between these 3 options:

1) Using load as a factor. In this case, can I use it in the random part of the model for random slopes? I mean, does it make sense to define a random effect for a factor?

2) Using load as both a factor and a continuous variable. Could I use load as a factor in the fixed part of the model and then code it as numeric (continuous) for the random part of the model?

3) Using load as continuous in both the fixed and the random part of the model. In this case, however, I don't know how to make between-group comparisons at specific load values.

Any suggestions are welcome.

Thanks in advance.

Manuel

More Manuel Lozano's questions See All
Similar questions and discussions