How to find the pattern and rate of change in a parameter for repeated measurement data

Viewed 53

I have data of Troponin (TRP) levels (a type of protein found in the muscles of heart) which are measured in more than 200 patients. The data is divided into Placebo and Drug-X group. For every patient, the TRP levels are measured in Day 1, 3, 7, 14, 21 and 28. Incase the patient is discharged before 28 days, one extra measurement , i.e TRP_on_discharge_day is taken and that can in any day between 1-28. NOTE: not all the subjects have all the measurements as some patients get discharged in between.

I have two questions:

Firstly, I want to study the average TRP level in placebo and Drug-X group and whether they are significantly different. As data has multiple measurements for each subject, I think, a normal t test cannot be done. So as I read elsewhere, I am trying a linear mixed model using lme4::lmer function. And my model is lmer( measurement ~ Randomization + (1|id)). where measurement is the TRP level, Randomization is the group (Placebo or Drug-X) and id is the id of subject. Is this correct way to model my question?

Secondly I want to study the pattern and rate of change in TRP in Placebo group and Drug-X group and test whether they are different. Can you please give me some help on how to do this, what technique to use.

I am dputing a sample data here.. any kind of help is highly appreciated.

structure(list(`Medication Code` = c(7001, 7004, 7008, 7009, 
7014, 7016, 7018, 7022, 7025, 7026, 7028, 7031, 7032, 7033, 7036, 
7038, 7039, 7044, 7045, 7052, 7055, 7057, 7066, 7068, 7079, 7081, 
7083, 7090, 7093, 7097, 7103, 7105, 7107, 7110, 7116, 7123, 7125, 
7129, 7132, 7133, 7135, 7136, 7142, 7143, 7144, 7146, 7150, 7151, 
7152, 7153, 7157, 7166, 7168, 7171, 7174, 7175, 7176, 7177, 7185, 
7186, 7189, 7192, 7195, 7197, 7200, 7202, 7004, 7008, 7010, 7018, 
7022, 7026, 7032, 7036, 7038, 7039, 7044, 7045, 7052, 7055, 7057, 
7066, 7081, 7097, 7116, 7123, 7125, 7132, 7133, 7135, 7142, 7143, 
7144, 7146, 7151, 7152, 7157, 7168, 7174, 7175, 7176, 7185, 7189, 
7195, 7198, 7202, 7009, 7018, 7022, 7026, 7028, 7038, 7052, 7081, 
7090, 7100, 7105, 7125, 7133, 7135, 7144, 7152, 7174, 7176, 7189, 
7038, 7066, 7116, 7133, 7135, 7133, 7135, 7135), Randomization = c("Placebo", 
"Placebo", "Drug-X", "Placebo", "Drug-X", "Placebo", 
"Drug-X", "Drug-X", "Drug-X", "Placebo", "Placebo", 
"Drug-X", "Placebo", "Placebo", "Drug-X", "Placebo", 
"Drug-X", "Drug-X", "Drug-X", "Drug-X", 
"Placebo", "Placebo", "Drug-X", "Drug-X", "Placebo", 
"Drug-X", "Placebo", "Placebo", "Placebo", "Placebo", "Placebo", 
"Drug-X", "Drug-X", "Drug-X", "Placebo", "Drug-X", 
"Drug-X", "Placebo", "Drug-X", "Placebo", "Placebo", 
"Placebo", "Placebo", "Drug-X", "Placebo", "Drug-X", 
"Drug-X", "Drug-X", "Placebo", "Drug-X", "Placebo", 
"Drug-X", "Drug-X", "Drug-X", "Placebo", "Drug-X", 
"Placebo", "Placebo", "Drug-X", "Drug-X", "Drug-X", 
"Placebo", "Placebo", "Placebo", "Placebo", "Placebo", "Placebo", 
"Drug-X", "Drug-X", "Drug-X", "Drug-X", 
"Placebo", "Placebo", "Drug-X", "Placebo", "Drug-X", 
"Drug-X", "Drug-X", "Drug-X", "Placebo", "Placebo", 
"Drug-X", "Drug-X", "Placebo", "Placebo", "Drug-X", 
"Drug-X", "Drug-X", "Placebo", "Placebo", "Placebo", 
"Drug-X", "Placebo", "Drug-X", "Drug-X", "Placebo", 
"Placebo", "Drug-X", "Placebo", "Drug-X", "Placebo", 
"Drug-X", "Drug-X", "Placebo", "Placebo", "Placebo", 
"Placebo", "Drug-X", "Drug-X", "Placebo", "Placebo", 
"Placebo", "Drug-X", "Drug-X", "Placebo", "Drug-X", 
"Drug-X", "Drug-X", "Placebo", "Placebo", "Placebo", 
"Placebo", "Placebo", "Placebo", "Drug-X", "Placebo", "Drug-X", 
"Placebo", "Placebo", "Placebo", "Placebo", "Placebo", "Placebo"
), trp_day = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 
2L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 
3L, 3L, 3L, 3L, 4L, 4L, 4L, 4L, 4L, 5L, 6L, 7L), .Label = c("TRP_DAY0", 
"TRP_DAY3", "TRP_DAY7", "TRP_DAY14", "TRP_DAY21", "TRP_DAY28", 
"TRP_DAY35"), class = "factor"), measurement = c(4, 17, 20.5, 
2.05, 5, 7, 8, 3, 5, 5, 5, 34, 3, 8, 4, 7, 7, 12, 5, 10, 10, 
16, 2, 8, 4, 8, 11, 15, 24, 5, 4, 8, 0.025, 4, 7, 7, 3, 3, 8, 
11, 16.7, 3, 9, 2, 4, 3, 4, 8, 12.6, 0.014, 7, 3.5, 7, 9, 13, 
9, 14, 6, 4.2, 6, 9, 6, 11, 9, 5, 12, 4, 5.5, 6, 5, 5, 6, 4, 
5, 3, 3, 7, 5, 6, 6, 10, 4, 6, 6, 13, 7, 3, 6, 12, 7, 4, 3, 4, 
3, 7, 10, 9, 4, 7, 5, 7, 4.8, 29, 9, 0.02, 6, 0.03, 3, 3, 5, 
6, 5, 5, 9, 5, 3, 15.1, 4, 10, 27, 3, 6, 8, 10, 15, 17, 3, 29, 
38, 17, 11, 8, 10), id = c(7001, 7004, 7008, 7009, 7014, 7016, 
7018, 7022, 7025, 7026, 7028, 7031, 7032, 7033, 7036, 7038, 7039, 
7044, 7045, 7052, 7055, 7057, 7066, 7068, 7079, 7081, 7083, 7090, 
7093, 7097, 7103, 7105, 7107, 7110, 7116, 7123, 7125, 7129, 7132, 
7133, 7135, 7136, 7142, 7143, 7144, 7146, 7150, 7151, 7152, 7153, 
7157, 7166, 7168, 7171, 7174, 7175, 7176, 7177, 7185, 7186, 7189, 
7192, 7195, 7197, 7200, 7202, 7004, 7008, 7010, 7018, 7022, 7026, 
7032, 7036, 7038, 7039, 7044, 7045, 7052, 7055, 7057, 7066, 7081, 
7097, 7116, 7123, 7125, 7132, 7133, 7135, 7142, 7143, 7144, 7146, 
7151, 7152, 7157, 7168, 7174, 7175, 7176, 7185, 7189, 7195, 7198, 
7202, 7009, 7018, 7022, 7026, 7028, 7038, 7052, 7081, 7090, 7100, 
7105, 7125, 7133, 7135, 7144, 7152, 7174, 7176, 7189, 7038, 7066, 
7116, 7133, 7135, 7133, 7135, 7135)), row.names = c(NA, -133L
), class = c("tbl_df", "tbl", "data.frame"))

1 Answers

For the first question:

I want to study the average TRP level in placebo and Drug-X group and whether they are significantly different.

...yes, the model:

lmer( measurement ~ Randomization + (1|id))

will provide an estimate of the difference between the two groups on average.

For the 2nd question:

I want to study the pattern and rate of change in TRP in Placebo group and Drug-X group and test whether they are different.

... you need to incorporate the time variable and interact it with the group variable:

lmer( measurement ~ Randomization*trp_day + (1|id))

and this will provide an estimate the slope over time in each group.

In the first instance it will be a good idea to treat time as numeric, not a factor.

Related