0
$\begingroup$

Here is my data:

_ I measured the response of a variable "Y" to 3 different treatments over time. "Treatment" is hence a 3 levels factor and "Time" is a continuous and numeric variable (unit=hours, from 1 to 6, time step=1).

_ In each experimentation, 1 and only 1 treatment was applied on the same individual over time (6h). Each treatment was replicated 10 times, but each replicate was done on different individuals.

My question is: Do I have to consider the error term due to the variability between individuals?

Like this--> model=lm(Y ~ Treatment * time + Error(Individual/Time)) ... or is it unnecessary because each experimentation is done on a different individual? I don't know yet how to add this error term if needed, just wondering about it.

It is not clear for me, and I didn't found any clear answer in the different questions asked on "Cross Validated". Thanks for your help!

$\endgroup$

1 Answer 1

0
$\begingroup$

If I understand you correctly, you applied each treatment on 10 different patients, and no patients received more than one treatment (so you have 30 different individuals in total). You then measured the dependent variable Y once per patient, 1-6 hours after the treatment was applied (or is it that the treatment was applied during 1-6 hours?), so you have one measurement of Y per patient. If all of this is correct, then you do not need to use any random effects, specify a correlational structure for the error terms or such.

Provided that I have understood the design of your experiment correctly, your model should be fine:

lm (Y ~ Treatment * time)

However, if you only have 30 observations, then you might not have any luck in using the interaction terms, since you will then have 6 parameters to estimate compared to 4 parameters without the interaction term:

lm (Y ~ Treatment + time)

Hope this helps!

EDIT: From the commentary I now understand that you have 6 measurements per patient. You then need a linear mixed model (perhaps a repeated measures ANOVA will do, but I'm not very familiar with it) to take the repeated measurements into account. This is because there will probably be correlations between the measurements of each individual.

library(lme4)
lmer (Y ~ Treatment * time + (1|ID))

Where ID is unique for each patient. But perhaps different patients metabolizes the drug att different speeds or something similar, so you could add a random effect on the slope of time for each individual:

lmer (Y ~ Treatment * time + (1 + time|ID))

Of course, all of this assumes that the effect of time on Y is linear, which may not be the case..

$\endgroup$
3
  • $\begingroup$ Thanks for your answer! No patient received more than one treatment. You understood well the design of my experiment, except that I have 6 measurements of Y per patient since I measured Y over 6 hours every hour. This is why I am wondering if I need to take into account "individuals" to determine the effect of "time" on Y. $\endgroup$ Commented Sep 8, 2015 at 18:45
  • $\begingroup$ And to give all information needed, the treatment is applied prior the experiment. $\endgroup$ Commented Sep 8, 2015 at 18:46
  • $\begingroup$ Good remark with the repeated measures (+1), maybe this is also interesting: stats.stackexchange.com/questions/166434/… $\endgroup$
    – user83346
    Commented Sep 10, 2015 at 8:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.