Hi everybody,
I try to model a growth curve for my data.
I try to observe differences in the trajectory of depression regarding the genetic status a participants (0-carier or 1-not carier). depression was measured at baseline (1), 2 month after result (2), 6 month (3), 1 (4) and 2 years (5) after results. I have read all is possible on LGC, and regarding the non linearity of my data, a piecewise model is the best solution.
I have tried tu run such a model but i'm clearly not sure about the syntax i have used. I'm interesting about the slope change between time intervals, and particularly if there is differences in the slope changes between carier and not carier of the gene.
Unfortunately, i have a troubling result.
the variables are :
depression : continuous
gene status : carier (1), non carier (0): categorical
Time : 1, 2, 3, 4 &5 : categorical
first i use mkspline to define 4 knots :
second, I ran the model with xtmixed
I obtain the following estimates with warning message of colinearity.
I think that the time values in variable colons are curious. for example there is a 5 under time1 section. i don't understand this labelling.
second, I suppose that terms omitted are just redundant with the porteur#time2 for example, as time1-2 represent the slope for non cariers and porteur#time2 represent the slope for cariers.
what we see here is that slope changes between the previous knots are sometimes significant. for example, time1-2 is significant as well as porteur#time1-12. but that does not tell me if the two slopes changes are statistically and significantly different between each other.
further, graphing this is verry challenging and I don't have success to plot the two growth curves.
any help and feedback would be very helpful. I give you also some data...
thanks a lot
carole

I try to model a growth curve for my data.
I try to observe differences in the trajectory of depression regarding the genetic status a participants (0-carier or 1-not carier). depression was measured at baseline (1), 2 month after result (2), 6 month (3), 1 (4) and 2 years (5) after results. I have read all is possible on LGC, and regarding the non linearity of my data, a piecewise model is the best solution.
I have tried tu run such a model but i'm clearly not sure about the syntax i have used. I'm interesting about the slope change between time intervals, and particularly if there is differences in the slope changes between carier and not carier of the gene.
Unfortunately, i have a troubling result.
the variables are :
depression : continuous
gene status : carier (1), non carier (0): categorical
Time : 1, 2, 3, 4 &5 : categorical
first i use mkspline to define 4 knots :
mkspline time1 2 time2 3 time3 4 time4 = Time, marginal
xtmixed dep porteur##time1 porteur##time2 porteur##time3 porteur##time4 || ID: Time, mle
. xtmixed dep porteur##time1 porteur##time2 porteur##time3 porteur##time4 || ID: Time, mle
note: 1.time2 omitted because of collinearity
note: 2.time2 omitted because of collinearity
note: 3.time2 omitted because of collinearity
note: 1.porteur#1.time2 omitted because of collinearity
note: 1.porteur#2.time2 omitted because of collinearity
note: 1.porteur#3.time2 omitted because of collinearity
note: 1.time3 omitted because of collinearity
note: 2.time3 omitted because of collinearity
note: 1.porteur#1.time3 omitted because of collinearity
note: 1.porteur#2.time3 omitted because of collinearity
note: 1.time4 omitted because of collinearity
note: 1.porteur#1.time4 omitted because of collinearity
Performing EM optimization:
Performing gradient-based optimization:
Iteration 0: log likelihood = -2278.8898
Iteration 1: log likelihood = -2277.0752
Iteration 2: log likelihood = -2277.0463
Iteration 3: log likelihood = -2277.0456
Iteration 4: log likelihood = -2277.0456
Computing standard errors:
Mixed-effects ML regression Number of obs = 631
Group variable: ID Number of groups = 193
Obs per group:
min = 1
avg = 3.3
max = 5
Wald chi2(9) = 51.69
Log likelihood = -2277.0456 Prob > chi2 = 0.0000
-------------------------------------------------------------------------------
dep | Coef. Std. Err. z P>|z| [95% Conf. Interval]
--------------+----------------------------------------------------------------
1.porteur | -1.000888 1.544808 -0.65 0.517 -4.028657 2.026881
|
time1 |
2 | -2.529787 1.084861 -2.33 0.020 -4.656075 -.4034987
3 | 1.761583 1.164203 1.51 0.130 -.5202119 4.043378
4 | 4.017521 1.201632 3.34 0.001 1.662365 6.372676
5 | -.4507877 1.278628 -0.35 0.724 -2.956852 2.055276
|
porteur#time1 |
1 2 | 4.780729 1.634244 2.93 0.003 1.577671 7.983788
1 3 | -3.651737 1.792905 -2.04 0.042 -7.165766 -.137707
1 4 | .4716759 1.868767 0.25 0.801 -3.19104 4.134392
1 5 | 1.41006 2.004701 0.70 0.482 -2.519083 5.339202
|
time2 |
1 | 0 (omitted)
2 | 0 (omitted)
3 | 0 (omitted)
|
porteur#time2 |
1 1 | 0 (omitted)
1 2 | 0 (omitted)
1 3 | 0 (omitted)
|
time3 |
1 | 0 (omitted)
2 | 0 (omitted)
|
porteur#time3 |
1 1 | 0 (omitted)
1 2 | 0 (omitted)
|
1.time4 | 0 (omitted)
|
porteur#time4 |
1 1 | 0 (omitted)
|
_cons | 12.6734 1.016518 12.47 0.000 10.68106 14.66574
-------------------------------------------------------------------------------
------------------------------------------------------------------------------
Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval]
-----------------------------+------------------------------------------------
ID: Independent |
sd(Time) | .2596632 1.007456 .0001294 521.1367
sd(_cons) | 7.785805 .5415579 6.793544 8.922994
-----------------------------+------------------------------------------------
sd(Residual) | 7.059303 .2545035 6.577701 7.576166
------------------------------------------------------------------------------
LR test vs. linear model: chi2(2) = 214.80 Prob > chi2 = 0.0000
note: 1.time2 omitted because of collinearity
note: 2.time2 omitted because of collinearity
note: 3.time2 omitted because of collinearity
note: 1.porteur#1.time2 omitted because of collinearity
note: 1.porteur#2.time2 omitted because of collinearity
note: 1.porteur#3.time2 omitted because of collinearity
note: 1.time3 omitted because of collinearity
note: 2.time3 omitted because of collinearity
note: 1.porteur#1.time3 omitted because of collinearity
note: 1.porteur#2.time3 omitted because of collinearity
note: 1.time4 omitted because of collinearity
note: 1.porteur#1.time4 omitted because of collinearity
Performing EM optimization:
Performing gradient-based optimization:
Iteration 0: log likelihood = -2278.8898
Iteration 1: log likelihood = -2277.0752
Iteration 2: log likelihood = -2277.0463
Iteration 3: log likelihood = -2277.0456
Iteration 4: log likelihood = -2277.0456
Computing standard errors:
Mixed-effects ML regression Number of obs = 631
Group variable: ID Number of groups = 193
Obs per group:
min = 1
avg = 3.3
max = 5
Wald chi2(9) = 51.69
Log likelihood = -2277.0456 Prob > chi2 = 0.0000
-------------------------------------------------------------------------------
dep | Coef. Std. Err. z P>|z| [95% Conf. Interval]
--------------+----------------------------------------------------------------
1.porteur | -1.000888 1.544808 -0.65 0.517 -4.028657 2.026881
|
time1 |
2 | -2.529787 1.084861 -2.33 0.020 -4.656075 -.4034987
3 | 1.761583 1.164203 1.51 0.130 -.5202119 4.043378
4 | 4.017521 1.201632 3.34 0.001 1.662365 6.372676
5 | -.4507877 1.278628 -0.35 0.724 -2.956852 2.055276
|
porteur#time1 |
1 2 | 4.780729 1.634244 2.93 0.003 1.577671 7.983788
1 3 | -3.651737 1.792905 -2.04 0.042 -7.165766 -.137707
1 4 | .4716759 1.868767 0.25 0.801 -3.19104 4.134392
1 5 | 1.41006 2.004701 0.70 0.482 -2.519083 5.339202
|
time2 |
1 | 0 (omitted)
2 | 0 (omitted)
3 | 0 (omitted)
|
porteur#time2 |
1 1 | 0 (omitted)
1 2 | 0 (omitted)
1 3 | 0 (omitted)
|
time3 |
1 | 0 (omitted)
2 | 0 (omitted)
|
porteur#time3 |
1 1 | 0 (omitted)
1 2 | 0 (omitted)
|
1.time4 | 0 (omitted)
|
porteur#time4 |
1 1 | 0 (omitted)
|
_cons | 12.6734 1.016518 12.47 0.000 10.68106 14.66574
-------------------------------------------------------------------------------
------------------------------------------------------------------------------
Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval]
-----------------------------+------------------------------------------------
ID: Independent |
sd(Time) | .2596632 1.007456 .0001294 521.1367
sd(_cons) | 7.785805 .5415579 6.793544 8.922994
-----------------------------+------------------------------------------------
sd(Residual) | 7.059303 .2545035 6.577701 7.576166
------------------------------------------------------------------------------
LR test vs. linear model: chi2(2) = 214.80 Prob > chi2 = 0.0000
I think that the time values in variable colons are curious. for example there is a 5 under time1 section. i don't understand this labelling.
second, I suppose that terms omitted are just redundant with the porteur#time2 for example, as time1-2 represent the slope for non cariers and porteur#time2 represent the slope for cariers.
what we see here is that slope changes between the previous knots are sometimes significant. for example, time1-2 is significant as well as porteur#time1-12. but that does not tell me if the two slopes changes are statistically and significantly different between each other.
further, graphing this is verry challenging and I don't have success to plot the two growth curves.
any help and feedback would be very helpful. I give you also some data...
thanks a lot
carole
Comment