Hello,
I have a mixed model (Stata 18) examining the effect of depression diagnosis (binary moderator) on social support (continuous independent variable) over four time points (late pregnancy, 6 months postpartum, 12 months postpartum, and when the child is aged 4 years) in a sample of 675 women. Some covariates are also included. I have created an interaction term between depression and time. I have run two separate models, one defining time as continuous, and the other with discrete time points. Time follows a non-linear trend, so I have used quadratic time in the continuous time model.
The two models lead to different conclusions, so I would appreciate your help to determine which model is more appropriate for my data.
Here is the output from the two models and the marginsplot. By the way, I did try to include a quadratic time term in the random part of the model as well in the continuous time model, but this model did not converge.
Continuous time model:
Discrete time model:
Marginsplot:

From the continuous time model I would conclude that there is no difference in the time trend between participants with and without depression, based on the non-significant interaction term of depression and quadratic time. But from the discrete time model the conclusion would be that compared to the baseline time, at the last two time points there is a difference between the two groups, with participants with depression having lower support rating than those without depression. This is based on the significant interaction of depression with the last two time points. Visually, the graph shows a relationship as described in my interpretation of the discrete time model, although the differences between the groups with and without depression at the last two time points are small.
Which model/interpretation would be more appropriate for this data, given the number of time points and the very uneven spacing between them?
I have a mixed model (Stata 18) examining the effect of depression diagnosis (binary moderator) on social support (continuous independent variable) over four time points (late pregnancy, 6 months postpartum, 12 months postpartum, and when the child is aged 4 years) in a sample of 675 women. Some covariates are also included. I have created an interaction term between depression and time. I have run two separate models, one defining time as continuous, and the other with discrete time points. Time follows a non-linear trend, so I have used quadratic time in the continuous time model.
The two models lead to different conclusions, so I would appreciate your help to determine which model is more appropriate for my data.
Here is the output from the two models and the marginsplot. By the way, I did try to include a quadratic time term in the random part of the model as well in the continuous time model, but this model did not converge.
Continuous time model:
Code:
. mixed sse_task i.depressed1##c.time_c##c.time_c ///
> c.epds_c ///
> i.parity c.agec i.Uni ///
> i.w1_empl_bin ///
> i.ethnicity_mo_bin i.ethnicity_fa_bin ///
> c.sles_events_c ///
> ecr_anx_avg_w1to4_c ecr_avoid_avg_w1to4_c ///
> || mpewsid: time_c, covariance(unstructured) reml
Performing EM optimization ...
Performing gradient-based optimization:
Iteration 0: Log restricted-likelihood = -4770.1932
Iteration 1: Log restricted-likelihood = -4767.5348
Iteration 2: Log restricted-likelihood = -4767.5289
Iteration 3: Log restricted-likelihood = -4767.5289
Computing standard errors ...
Mixed-effects REML regression Number of obs = 1,855
Group variable: mpewsid Number of groups = 675
Obs per group:
min = 1
avg = 2.7
max = 4
Wald chi2(15) = 390.69
Log restricted-likelihood = -4767.5289 Prob > chi2 = 0.0000
----------------------------------------------------------------------------------------------
sse_task | Coefficient Std. err. z P>|z| [95% conf. interval]
-----------------------------+----------------------------------------------------------------
1.depressed1 | .2865289 .3794629 0.76 0.450 -.4572046 1.030262
time_c | -1.546026 .1987641 -7.78 0.000 -1.935596 -1.156455
|
depressed1#c.time_c |
1 | -.6075963 .4814766 -1.26 0.207 -1.551273 .3360804
|
c.time_c#c.time_c | .3762828 .0669686 5.62 0.000 .2450268 .5075388
|
depressed1#c.time_c#c.time_c |
1 | .0417941 .1595366 0.26 0.793 -.2708918 .3544801
|
epds_c | -.1388265 .0184937 -7.51 0.000 -.1750735 -.1025795
|
parity |
1. Not Nulliparous | .2275241 .2618764 0.87 0.385 -.2857442 .7407925
agec | .0338147 .0264577 1.28 0.201 -.0180414 .0856709
|
Uni |
1. University | -.0600735 .2522428 -0.24 0.812 -.5544603 .4343134
1.w1_empl_bin | -.0888899 .3328792 -0.27 0.789 -.7413212 .5635415
|
ethnicity_mo_bin |
1. Other | .0570491 .3783086 0.15 0.880 -.684422 .7985203
|
ethnicity_fa_bin |
1. Other/ETSI | .419161 .2723208 1.54 0.124 -.1145779 .9528999
sles_events_c | -.0595556 .0432661 -1.38 0.169 -.1443556 .0252444
ecr_anx_avg_w1to4_c | -.0445726 .023182 -1.92 0.055 -.0900086 .0008633
ecr_avoid_avg_w1to4_c | -.261847 .0301575 -8.68 0.000 -.3209546 -.2027394
_cons | 14.1528 .3740304 37.84 0.000 13.41971 14.88589
----------------------------------------------------------------------------------------------
------------------------------------------------------------------------------
Random-effects parameters | Estimate Std. err. [95% conf. interval]
-----------------------------+------------------------------------------------
mpewsid: Unstructured |
var(time_c) | .3016405 .1238084 .1349316 .6743193
var(_cons) | 6.49939 .6623925 5.322571 7.936403
cov(time_c,_cons) | -.3605016 .231909 -.8150348 .0940317
-----------------------------+------------------------------------------------
var(Residual) | 5.798138 .3019169 5.235586 6.421134
------------------------------------------------------------------------------
LR test vs. linear model: chi2(3) = 400.36 Prob > chi2 = 0.0000
Note: LR test is conservative and provided only for reference.
.
end of do-file
Code:
. mixed sse_task i.depressed1##i.time_c ///
> c.epds_c ///
> i.parity c.agec i.Uni ///
> i.w1_empl_bin ///
> i.ethnicity_mo_bin i.ethnicity_fa_bin ///
> c.sles_events_c ///
> ecr_anx_avg_w1to4_c ecr_avoid_avg_w1to4_c ///
> || mpewsid: time_c, covariance(unstructured) reml
Performing EM optimization ...
Performing gradient-based optimization:
Iteration 0: Log restricted-likelihood = -4766.5115
Iteration 1: Log restricted-likelihood = -4763.8273
Iteration 2: Log restricted-likelihood = -4763.821
Iteration 3: Log restricted-likelihood = -4763.821
Computing standard errors ...
Mixed-effects REML regression Number of obs = 1,855
Group variable: mpewsid Number of groups = 675
Obs per group:
min = 1
avg = 2.7
max = 4
Wald chi2(17) = 391.93
Log restricted-likelihood = -4763.821 Prob > chi2 = 0.0000
---------------------------------------------------------------------------------------
sse_task | Coefficient Std. err. z P>|z| [95% conf. interval]
----------------------+----------------------------------------------------------------
1.depressed1 | .2949209 .3827446 0.77 0.441 -.4552446 1.045086
|
time_c |
1 | -1.273449 .1761843 -7.23 0.000 -1.618764 -.9281342
2 | -1.520477 .1821599 -8.35 0.000 -1.877504 -1.163451
3 | -1.307527 .2046438 -6.39 0.000 -1.708622 -.9064327
|
depressed1#time_c |
1 1 | -.6201199 .4151962 -1.49 0.135 -1.433889 .1936496
1 2 | -.9784331 .4578381 -2.14 0.033 -1.875779 -.0810869
1 3 | -1.477005 .4838893 -3.05 0.002 -2.425411 -.5285996
|
epds_c | -.1384583 .0185332 -7.47 0.000 -.1747826 -.102134
|
parity |
1. Not Nulliparous | .2303759 .2620228 0.88 0.379 -.2831794 .7439312
agec | .0335779 .0264718 1.27 0.205 -.0183058 .0854616
|
Uni |
1. University | -.0594466 .2523863 -0.24 0.814 -.5541146 .4352214
1.w1_empl_bin | -.0888475 .3330563 -0.27 0.790 -.7416259 .5639309
|
ethnicity_mo_bin |
1. Other | .0557079 .3785079 0.15 0.883 -.686154 .7975697
|
ethnicity_fa_bin |
1. Other/ETSI | .4190539 .272474 1.54 0.124 -.1149853 .9530931
sles_events_c | -.0543912 .0434807 -1.25 0.211 -.1396118 .0308293
ecr_anx_avg_w1to4_c | -.0445926 .0231945 -1.92 0.055 -.0900529 .0008678
ecr_avoid_avg_w1to4_c | -.2614904 .0301753 -8.67 0.000 -.3206328 -.2023479
_cons | 14.17102 .3747369 37.82 0.000 13.43655 14.90549
---------------------------------------------------------------------------------------
------------------------------------------------------------------------------
Random-effects parameters | Estimate Std. err. [95% conf. interval]
-----------------------------+------------------------------------------------
mpewsid: Unstructured |
var(time_c) | .2990392 .1237861 .1328546 .6731003
var(_cons) | 6.494387 .6626208 5.317289 7.932061
cov(time_c,_cons) | -.3536033 .2318515 -.8080239 .1008173
-----------------------------+------------------------------------------------
var(Residual) | 5.801771 .30254 5.238099 6.4261
------------------------------------------------------------------------------
LR test vs. linear model: chi2(3) = 400.09 Prob > chi2 = 0.0000
Note: LR test is conservative and provided only for reference.
.
end of do-file
From the continuous time model I would conclude that there is no difference in the time trend between participants with and without depression, based on the non-significant interaction term of depression and quadratic time. But from the discrete time model the conclusion would be that compared to the baseline time, at the last two time points there is a difference between the two groups, with participants with depression having lower support rating than those without depression. This is based on the significant interaction of depression with the last two time points. Visually, the graph shows a relationship as described in my interpretation of the discrete time model, although the differences between the groups with and without depression at the last two time points are small.
Which model/interpretation would be more appropriate for this data, given the number of time points and the very uneven spacing between them?

Comment