Skip to main content
added 20 characters in body
Source Link

As some part of the data were exampled above, I have 200 different log-transformed measurements taken from each paired sites at each time point, but not all subjects have complete sample sets. Assuming the measurements are not following linear trend, can you please suggest (to someone who is pretty new to the GAMs/GAMMs) how can I perform testing whether measurements have significantly different longitudinal trend between healthy and disease groups by taking care of the paired sampling strategy using GAM or GAMMs in R?

As some part of the data were exampled above, I have 200 different measurements taken from each paired sites at each time point, but not all subjects have complete sample sets. Assuming the measurements are not following linear trend, can you please suggest (to someone who is pretty new to the GAMs/GAMMs) how can I perform testing whether measurements have significantly different longitudinal trend between healthy and disease groups by taking care of the paired sampling strategy using GAM or GAMMs in R?

As some part of the data were exampled above, I have 200 different log-transformed measurements taken from each paired sites at each time point, but not all subjects have complete sample sets. Assuming the measurements are not following linear trend, can you please suggest (to someone who is pretty new to the GAMs/GAMMs) how can I perform testing whether measurements have significantly different longitudinal trend between healthy and disease groups by taking care of the paired sampling strategy using GAM or GAMMs in R?

added 699 characters in body
Source Link
ID SampleGroup Week
X1Sample1 Healthy 0
X1 Sample2Disease 0
X1Sample3 Healthy 2
X1 Sample4Disease 2
X1Sample5 Healthy 5
X1 Sample6Healthy 16
X1Sample7 Disease 16
X2 Sample8Healthy 0
X2Sample9 Disease 0
X2 Sample10Healthy 2
X2Sample11 Disease 2
X2 Sample12Healthy 5
X2Sample13 Disease 5
X2 Sample14Healthy 16
X2 Sample15Disease 16
X3Sample16 Healthy 0
X3Sample17 Disease 0
X3Sample18 Healthy 2
X3 Sample19Disease 2
X3Sample20 Healthy 5
X3 Sample21Disease 5
X3 Sample22Healthy 16
X3Sample23 Disease 16
X4Sample24 Disease 0
X4Sample25 Healthy 2
X4Sample26 Disease 2
X4 Sample27Healthy 5
X4Sample28 Disease 5
X4 Sample29Healthy 16
X4 Sample30Disease 16

The ID columns define each subject that paired samples collected from. There are total of four time points; 0, 2, 5, and 16.

As some part of the data were exampled above, I have 200 different measurements taken from each paired sites at each time point, but not all subjects have complete sample sets. Assuming the measurements are not following linear trend, can you please suggest (to someone who is pretty new to the GAMs/GAMMs) how can I perform testing whether measurements have significantly different longitudinal trend between healthy and disease groups by taking care of the paired sampling strategy using GAM or GAMMs in R?

PS: I tried some models such as

gam(Measurement1 ~ Group + Week +
            s(ID, bs = 're'),
          data = data, method = 'REML')

but I need some other families to test rather than Gaussian.

ID Group Week
X1 Healthy 0
X1 Disease 0
X1 Healthy 2
X1 Disease 2
X1 Healthy 5
X1 Healthy 16
X1 Disease 16
X2 Healthy 0
X2 Disease 0
X2 Healthy 2
X2 Disease 2
X2 Healthy 5
X2 Disease 5
X2 Healthy 16
X2 Disease 16
X3 Healthy 0
X3 Disease 0
X3 Healthy 2
X3 Disease 2
X3 Healthy 5
X3 Disease 5
X3 Healthy 16
X3 Disease 16
X4 Disease 0
X4 Healthy 2
X4 Disease 2
X4 Healthy 5
X4 Disease 5
X4 Healthy 16
X4 Disease 16

As some part of the data were exampled above, I have 200 different measurements taken from each paired sites at each time point, but not all subjects have complete sample sets. Assuming the measurements are not following linear trend, can you please suggest (to someone who is pretty new to the GAMs/GAMMs) how can I perform testing whether measurements have significantly different longitudinal trend between healthy and disease groups by taking care of the paired sampling strategy using GAM or GAMMs in R?

ID SampleGroup Week
X1Sample1 Healthy 0
X1 Sample2Disease 0
X1Sample3 Healthy 2
X1 Sample4Disease 2
X1Sample5 Healthy 5
X1 Sample6Healthy 16
X1Sample7 Disease 16
X2 Sample8Healthy 0
X2Sample9 Disease 0
X2 Sample10Healthy 2
X2Sample11 Disease 2
X2 Sample12Healthy 5
X2Sample13 Disease 5
X2 Sample14Healthy 16
X2 Sample15Disease 16
X3Sample16 Healthy 0
X3Sample17 Disease 0
X3Sample18 Healthy 2
X3 Sample19Disease 2
X3Sample20 Healthy 5
X3 Sample21Disease 5
X3 Sample22Healthy 16
X3Sample23 Disease 16
X4Sample24 Disease 0
X4Sample25 Healthy 2
X4Sample26 Disease 2
X4 Sample27Healthy 5
X4Sample28 Disease 5
X4 Sample29Healthy 16
X4 Sample30Disease 16

The ID columns define each subject that paired samples collected from. There are total of four time points; 0, 2, 5, and 16.

As some part of the data were exampled above, I have 200 different measurements taken from each paired sites at each time point, but not all subjects have complete sample sets. Assuming the measurements are not following linear trend, can you please suggest (to someone who is pretty new to the GAMs/GAMMs) how can I perform testing whether measurements have significantly different longitudinal trend between healthy and disease groups by taking care of the paired sampling strategy using GAM or GAMMs in R?

PS: I tried some models such as

gam(Measurement1 ~ Group + Week +
            s(ID, bs = 're'),
          data = data, method = 'REML')

but I need some other families to test rather than Gaussian.

Source Link

GAM(M) for longitudinal measurements from paired control treatment samples in R

I have a test dataset looking like;

ID Group Week
X1 Healthy 0
X1 Disease 0
X1 Healthy 2
X1 Disease 2
X1 Healthy 5
X1 Healthy 16
X1 Disease 16
X2 Healthy 0
X2 Disease 0
X2 Healthy 2
X2 Disease 2
X2 Healthy 5
X2 Disease 5
X2 Healthy 16
X2 Disease 16
X3 Healthy 0
X3 Disease 0
X3 Healthy 2
X3 Disease 2
X3 Healthy 5
X3 Disease 5
X3 Healthy 16
X3 Disease 16
X4 Disease 0
X4 Healthy 2
X4 Disease 2
X4 Healthy 5
X4 Disease 5
X4 Healthy 16
X4 Disease 16

As some part of the data were exampled above, I have 200 different measurements taken from each paired sites at each time point, but not all subjects have complete sample sets. Assuming the measurements are not following linear trend, can you please suggest (to someone who is pretty new to the GAMs/GAMMs) how can I perform testing whether measurements have significantly different longitudinal trend between healthy and disease groups by taking care of the paired sampling strategy using GAM or GAMMs in R?