Dear all.
I'm fairly new to linear mixed effects models and so apologize in advance if my questions are very basic.
I need help understanding what my results mean, and hope you can provide it.
My data is derived from a design wherein I measured a parameter, "metabolism" on 36 subjects (identified by "id") in three groups (1, 2 and 3 in "group") at two different time points (1 and 2 in "time"). I am interested in:
1) Does metabolism in the three groups differ from each other at the time point 1 and time point 2?
2) Does metabolism change over time?
3) Does being in a certain group change how metabolism changes over time?
I am using Stata 14.2 and run the following command:
xtmixed metabolism group##time || id:, var
and get the following output:
I then run
contrast group##time
and get the following:
. contrast group##time
Contrasts of marginal linear predictions
Margins : asbalanced
------------------------------------------------
| df chi2 P>chi2
-------------+----------------------------------
metabolism |
group | 2 7.06 0.0293
|
time | 1 7.89 0.0050
|
group#time | 2 0.35 0.8415
------------------------------------------------
So, it seems there's a difference between groups, and that metabolism changes over time, but no interaction means that being in a certain group doesn't impact how metabolism changes over time. Am I correct here?
Now, to go further and answer my first question above, what can I do? I could run
contrast group@time, effect
which would look like this:
. contrast group@time, effect
Contrasts of marginal linear predictions
Margins : asbalanced
------------------------------------------------
| df chi2 P>chi2
-------------+----------------------------------
metabolism |
group@time |
1 | 2 2.17 0.3387
2 | 2 5.61 0.0606
Joint | 4 7.77 0.1003
------------------------------------------------
--------------------------------------------------------------------------------
| Contrast Std. Err. z P>|z| [95% Conf. Interval]
---------------+----------------------------------------------------------------
metabolism |
group@time |
(2 vs base) 1 | -.0126059 .0162712 -0.77 0.438 -.0444968 .0192849
(2 vs base) 2 | -.0252223 .0153346 -1.64 0.100 -.0552777 .004833
(3 vs base) 1 | .0139877 .0177918 0.79 0.432 -.0208836 .0488591
(3 vs base) 2 | .0111259 .0166902 0.67 0.505 -.0215863 .0438381
--------------------------------------------------------------------------------
Here we see whether there are any differences between the groups at the two time points and "joint", and it appears there are no differences between groups, which I am a little confused about, since the contrast group##time command told me there was a differences between groups. Can anyone help explaining this? And; am I even allowed to use the contrast group@time, effect command when no interaction is present? Or does the fact that no interaction is present mean I should simply run oneway anova, restricted to the two time points, as in these two commands:
oneway metabolism group if time==1, sidak tabulate
oneway metabolism group if time==2, sidak tabulate
Thank you so much in advance - I really appreciate any help you can give me in understanding these results.
Sincerely
Rasmus
I'm fairly new to linear mixed effects models and so apologize in advance if my questions are very basic.
I need help understanding what my results mean, and hope you can provide it.
My data is derived from a design wherein I measured a parameter, "metabolism" on 36 subjects (identified by "id") in three groups (1, 2 and 3 in "group") at two different time points (1 and 2 in "time"). I am interested in:
1) Does metabolism in the three groups differ from each other at the time point 1 and time point 2?
2) Does metabolism change over time?
3) Does being in a certain group change how metabolism changes over time?
I am using Stata 14.2 and run the following command:
xtmixed metabolism group##time || id:, var
and get the following output:
. xtmixed metabolism group##time || id:, var |
Performing EM optimization: |
Performing gradient-based optimization: |
Iteration 0: log likelihood = 121.88734 |
Iteration 1: log likelihood = 122.32628 |
Iteration 2: log likelihood = 122.32652 |
Iteration 3: log likelihood = 122.32652 |
Computing standard errors: |
Mixed-effects ML regression Number of obs = 67 |
Group variable: id Number of groups = 36 |
Obs per group: |
min = 1 |
avg = 1.9 |
max = 2 |
Wald chi2(5) = 15.46 |
Log likelihood = 122.32652 Prob > chi2 = 0.0086 |
metabolism | Coef. Std. Err. z P>|z| [95% Conf. Interval] |
group | |
2 | -.0126059 .0162712 -0.77 0.438 -.0444968 .0192849 |
3 | .0139877 .0177918 0.79 0.432 -.0208836 .0488591 |
| |
2.time | .0323302 .0159135 2.03 0.042 .0011403 .0635201 |
| |
group#time | |
2 2 | -.0126164 .0223585 -0.56 0.573 -.0564382 .0312054 |
3 2 | -.0028619 .0243949 -0.12 0.907 -.0506751 .0449513 |
| |
_cons | .1481151 .0112525 13.16 0.000 .1260605 .1701697 |
Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] |
id: Identity | |
var(_cons) | 3.38e-22 2.59e-21 1.02e-28 1.12e-15 |
var(Residual) | .0015194 .0002625 .001083 .0021318 |
LR test vs. linear model: chibar2(01) = 0.00 Prob >= chibar2 = 1.0000 |
contrast group##time
and get the following:
. contrast group##time
Contrasts of marginal linear predictions
Margins : asbalanced
------------------------------------------------
| df chi2 P>chi2
-------------+----------------------------------
metabolism |
group | 2 7.06 0.0293
|
time | 1 7.89 0.0050
|
group#time | 2 0.35 0.8415
------------------------------------------------
So, it seems there's a difference between groups, and that metabolism changes over time, but no interaction means that being in a certain group doesn't impact how metabolism changes over time. Am I correct here?
Now, to go further and answer my first question above, what can I do? I could run
contrast group@time, effect
which would look like this:
. contrast group@time, effect
Contrasts of marginal linear predictions
Margins : asbalanced
------------------------------------------------
| df chi2 P>chi2
-------------+----------------------------------
metabolism |
group@time |
1 | 2 2.17 0.3387
2 | 2 5.61 0.0606
Joint | 4 7.77 0.1003
------------------------------------------------
--------------------------------------------------------------------------------
| Contrast Std. Err. z P>|z| [95% Conf. Interval]
---------------+----------------------------------------------------------------
metabolism |
group@time |
(2 vs base) 1 | -.0126059 .0162712 -0.77 0.438 -.0444968 .0192849
(2 vs base) 2 | -.0252223 .0153346 -1.64 0.100 -.0552777 .004833
(3 vs base) 1 | .0139877 .0177918 0.79 0.432 -.0208836 .0488591
(3 vs base) 2 | .0111259 .0166902 0.67 0.505 -.0215863 .0438381
--------------------------------------------------------------------------------
Here we see whether there are any differences between the groups at the two time points and "joint", and it appears there are no differences between groups, which I am a little confused about, since the contrast group##time command told me there was a differences between groups. Can anyone help explaining this? And; am I even allowed to use the contrast group@time, effect command when no interaction is present? Or does the fact that no interaction is present mean I should simply run oneway anova, restricted to the two time points, as in these two commands:
oneway metabolism group if time==1, sidak tabulate
oneway metabolism group if time==2, sidak tabulate
Thank you so much in advance - I really appreciate any help you can give me in understanding these results.
Sincerely
Rasmus