Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Selection of appropriate test for pre/post intervention (single arm) with repeated measures - Is the Mixed Linear Model most appropriate?

    Hello Stata Forum,

    I hope you all are doing well!

    I wanted to clarify my utilization of the mixed linear model and whether it would more appropriate to say do an ANOVA or control for other variables.

    I have a single-arm study evaluating the efficacy of a weight loss drug, drug A, in reducing a calculated weight score at 3 months from pre-intervention (month4). There are 10 study subjects as shown below with weight scores recorded at months 1, 2, and 3 (all recorded) after administration.

    My objective is to determine if there is a significant difference between pre-intervention (month1) and post-intervention at 3 months (month4). Rather than complete a simple paired-sample T-test, I wanted to trend the change over time.
    subject month1 month2 month3 month4
    1 1.91 1.50 1.66 1.45
    2 1.50 1.20 1.10 0.90
    3 1.64 2.03 1.50 1.44
    4 2.03 2.00 1.60 1.50
    5 1.49 1.65 1.55 1.67
    6 1.65 1.50 1.45 1.33
    7 1.38 1.32 1.10 1.40
    8 1.55 1.50 1.34 1.20
    9 1.39 1.55 1.67 1.20
    10 1.24 1.10 0.90 0.60
    I first converted to long format from my data collection:

    reshape long month, i(subject) j(time)

    then used the repeated measures mixed model with random effects for time


    mixed month time || subject:, var reml
    margins, at (time=(1(1)4))
    marginsplot, x(time)



    Computing standard errors:

    Mixed-effects REML regression Number of obs = 40
    Group variable: subject Number of groups = 10

    Obs per group:
    min = 4
    avg = 4.0
    max = 4

    Wald chi2(1) = 22.83
    Log restricted-likelihood = 1.9729634 Prob > chi2 = 0.0000

    ------------------------------------------------------------------------------
    month | Coef. Std. Err. z P>|z| [95% Conf. Interval]
    -------------+----------------------------------------------------------------
    time | -.1075 .0224969 -4.78 0.000 -.1515932 -.0634068
    _cons | 1.6035 .0848196 18.90 0.000 1.437257 1.769743
    ------------------------------------------------------------------------------

    ------------------------------------------------------------------------------
    Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval]
    -----------------------------+------------------------------------------------
    subject: Identity |
    var(_cons) | .0542298 .0285948 .0192934 .1524288
    -----------------------------+------------------------------------------------
    var(Residual) | .0253056 .0066456 .0151245 .0423402
    ------------------------------------------------------------------------------
    LR test vs. linear model: chibar2(01) = 21.80 Prob >= chibar2 = 0.0000


    I see it is significant but I also get a fixed portion prediction - am I controlling for time incorrectly? Also, would I be best served performing an ANOVA?

    Thank you all

  • #2
    First of all, you have not -xtset- your data after -reshape-. To do that:

    Code:
    xtset subject time
    Second, in your model time is a continuous variable and you are assuming a linear effect of time. Based on your model results, this means that weight at all time points had a significant reduction at all time points after per-intervention time (month-1). This can be further tested and seen from your -margins- command:

    Code:
    margins, at(time=(1(1)4)) contrast(atcontrast(r._at))
    
    Expression: Linear prediction, fixed portion, predict()
    1._at: time = 1
    2._at: time = 2
    3._at: time = 3
    4._at: time = 4
    
    ------------------------------------------------
                 |         df        chi2     P>chi2
    -------------+----------------------------------
             _at |
       (2 vs 1)  |          1        7.54     0.0061
       (3 vs 1)  |          1        7.54     0.0061
       (4 vs 1)  |          1        7.54     0.0061
          Joint  |          1        7.54     0.0061
    ------------------------------------------------
    
    --------------------------------------------------------------
                 |            Delta-method
                 |   Contrast   std. err.     [95% conf. interval]
    -------------+------------------------------------------------
             _at |
       (2 vs 1)  |     -.1075   .0391615     -.1842551   -.0307448
       (3 vs 1)  |      -.215    .078323     -.3685103   -.0614897
       (4 vs 1)  |     -.3225   .1174845     -.5527654   -.0922345
    --------------------------------------------------------------
    While the results above shows significant reduction in weight at all time points after month-1, the findings contradicts if you consider time as categorical in the model and the trend does appear to be linear. Instead of all time points, only the 2nd and the last time point (month-4) has significantly lower weight compared to the weight at per-intervention time (month-1).

    Code:
     mixed month i.time ||subject:, reml
    
    ------------------------------------------------------------------------------
           month | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
    -------------+----------------------------------------------------------------
            time |
              2  |      -.043   .0725558    -0.59   0.553    -.1852068    .0992069
              3  |      -.191   .0725558    -2.63   0.008    -.3332068   -.0487931
              4  |      -.309   .0725558    -4.26   0.000    -.4512068   -.1667931
                 |
           _cons |      1.578   .0896089    17.61   0.000      1.40237     1.75363
    ------------------------------------------------------------------------------
    
    
    
    margins time
    
    marginsplot
    I think you model is better with time as a categorical variable.
    Last edited by Roman Mostazir; 01 Apr 2022, 18:12. Reason: Corrected wrong presentation of command
    Roman

    Comment


    • #3
      Dear Roman,

      Thank you so very much for your time and guidance! I sincerely apologize for the delay in my response, was dealing with a melt down in the lab.
      If I could please pose some follow up questions, my basic understanding of the mixed linear model seems to be far more deficit than I originally thought.


      While the results above shows significant reduction in weight at all time points after month-1, the findings contradicts if you consider time as categorical in the model and the trend does appear to be linear. Instead of all time points, only the 2nd and the last time point (month-4) has significantly lower weight compared to the weight at per-intervention time (month-1).


      If the findings contradicts if time is considered categorical, wouldn't it be better to not run the between groups effect (time) as such?
      Based on the individualized time points above, a reduction in weight score is seen at every assessment point however, it seems only month2 has a significantly lower weight - or am I interpreting this incorrectly?

      Though I guess the clear visual of the margins plot using time as categorical variable shows an obvious trend down (greatly appreciate your recommendations and will keep it! I just want to improve my understanding so as to not report my assessment in error.

      Thank you,

      Brian

      Comment


      • #4
        My sincere apologies for creating couple of confusions here in my reply #2. In place of "...trend does appear to be linear' please read "trend does appear to be non-linear. And "Instead of all time points, only the 2nd and the last time point (month-4)as significantly lower weight...." please read "Instead of all time points, only the 3rd and the last time point (month-4) has significantly lower weight.....". Very crucial typos in couple of very crucial places but happy to see that it didn't affect your understanding as you correctly mentioned "...trend down" in the later part of your query#3.

        Replying to #3: To clarify your understanding it needs to mention here that you are not running a between-group analyses as you have only one group. You are looking at mean reduction in weight over time for a group of subjects who are expected to be similar in characteristics (by randomization). A between-group design study will have two groups of subjects. I don't think the findings contradicts each other greatly whether you make 'time' continuous or 'categorical' but with 'time' as a categorical variable, the model is a different beast than 'time' as continuous.With continuous 'time', your effect shows a linear reduction in weight at all time points (the amount of reduction in weight is similar/linear) while 'time' as categorical shows a non-linear downward trend and we know that it is the moth-3 and month-4 when the reduction is significantly different than time-1. Contrary to your understanding, at month-2 the difference is not statistically! significant (p=0.553). Look for the p-values in the time-categorical model. I assume you are testing the hypothesis at 95% level of alpha and in that case p<0.05 is considered as statistically significant reduction in weight compared to the baseline measure (time-1). This is a general practice of interpreting p-values, but there are other school of thoughts against its use which is a different story and I will not stress it here.

        A housekeeping suggestion: Rename your 'month1' 'month2' ...variable names as 'weight1', 'weight2' etc.. so that when the dataset is in long shape time will take the value for 1, 2... and 'weight' will correspond to the relevant measurement. Otherwise it gets confusing when referring to weight as 'month'!
        Last edited by Roman Mostazir; 05 Apr 2022, 20:01.
        Roman

        Comment


        • #5
          Originally posted by Brian Yoo View Post
          If the findings contradicts if time is considered categorical, wouldn't it be better to not run the between groups effect (time) as such?
          Not necessarily. You can examine linear trend in the time course (there's no between-groups effect) even if you model time as categorical. You would use the -contrast- postestimation command and look at the linear component of the set of orthogonal polynomial contrasts.

          I show an example of its use below with your dataset--look for the test statistic in the -contrast- command's output where the component is labeled "(linear)". (Begin at the "Begin here" comment. I've renamed the variables for brevity and clarity.)

          One other feature of -mixed- and its postestimation commands that might come in handy in this case is the use of the -dfmethod()- option for small samples, which is also illustrated below.

          Based on the individualized time points above, a reduction in weight score is seen at every assessment point however, it seems only month2 has a significantly lower weight - or am I interpreting this incorrectly?
          I wouldn't recommend allowing the presence or absence of statistical significance at any given time point to govern the interpretation here. Again, the trend is evident even when the time variable is treated as categorical.

          I also show fitting a MANOVA model as an alternative to repeated measures ANOVA. As is typically observed, MANOVA here has less power than the corresponding repeated measures ANOVA, but it does offer at least one advantage, namely, that you can explore the pattern of variation in residual variance and covariance over the time course of drug treatment. (MANOVA using -mixed- and -contrast- in the manner shown below gives the same F test statistic for the time variable that you would get with -manova- and -manovatest-.)

          .ÿ
          .ÿversionÿ17.0

          .ÿ
          .ÿclearÿ*

          .ÿ
          .ÿquietlyÿinputÿbyteÿsubjectÿdouble(month1ÿmonth2ÿmonth3ÿmonth4)

          .ÿ
          .ÿrenameÿsubjectÿpid

          .ÿrenameÿmonth#ÿsco#,ÿsortÿrenumber(0)

          .ÿ
          .ÿquietlyÿreshapeÿlongÿsco,ÿi(pid)ÿj(tim)

          .ÿlabelÿvariableÿpidÿ"ParticipantÿID"

          .ÿlabelÿvariableÿtimÿMonth

          .ÿlabelÿvariableÿscoÿ"WeightÿScore"

          .ÿ
          .ÿ*
          .ÿ*ÿBeginÿhere
          .ÿ*
          .ÿ//ÿCategoricalÿtime--repeatedÿmeasures
          .ÿmixedÿscoÿi.timÿ||ÿpid:ÿ,ÿremlÿdfmethod(kroger)ÿnolrtestÿnolog

          Mixed-effectsÿREMLÿregressionÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿNumberÿofÿobsÿÿÿÿÿ=ÿÿÿÿÿÿÿÿÿ40
          Groupÿvariable:ÿpidÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿNumberÿofÿgroupsÿÿ=ÿÿÿÿÿÿÿÿÿ10
          ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿObsÿperÿgroup:
          ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿminÿ=ÿÿÿÿÿÿÿÿÿÿ4
          ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿavgÿ=ÿÿÿÿÿÿÿÿ4.0
          ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿmaxÿ=ÿÿÿÿÿÿÿÿÿÿ4
          DFÿmethod:ÿKenward–RogerÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿDF:ÿÿÿÿÿÿÿÿÿÿÿminÿ=ÿÿÿÿÿÿ15.28
          ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿavgÿ=ÿÿÿÿÿÿ24.07
          ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿmaxÿ=ÿÿÿÿÿÿ27.00
          ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿF(3,ÿÿÿÿ27.00)ÿÿÿÿ=ÿÿÿÿÿÿÿ7.61
          Logÿrestricted-likelihoodÿ=ÿ-.20210417ÿÿÿÿÿÿÿÿÿÿProbÿ>ÿFÿÿÿÿÿÿÿÿÿÿ=ÿÿÿÿÿ0.0008

          ------------------------------------------------------------------------------
          ÿÿÿÿÿÿÿÿÿscoÿ|ÿCoefficientÿÿStd.ÿerr.ÿÿÿÿÿÿtÿÿÿÿP>|t|ÿÿÿÿÿ[95%ÿconf.ÿinterval]
          -------------+----------------------------------------------------------------
          ÿÿÿÿÿÿÿÿÿtimÿ|
          ÿÿÿÿÿÿÿÿÿÿ1ÿÿ|ÿÿÿÿÿÿ-.043ÿÿÿ.0725559ÿÿÿÿ-0.59ÿÿÿ0.558ÿÿÿÿ-.1918723ÿÿÿÿ.1058723
          ÿÿÿÿÿÿÿÿÿÿ2ÿÿ|ÿÿÿÿÿÿ-.191ÿÿÿ.0725559ÿÿÿÿ-2.63ÿÿÿ0.014ÿÿÿÿ-.3398723ÿÿÿ-.0421277
          ÿÿÿÿÿÿÿÿÿÿ3ÿÿ|ÿÿÿÿÿÿ-.309ÿÿÿ.0725559ÿÿÿÿ-4.26ÿÿÿ0.000ÿÿÿÿ-.4578723ÿÿÿ-.1601277
          ÿÿÿÿÿÿÿÿÿÿÿÿÿ|
          ÿÿÿÿÿÿÿ_consÿ|ÿÿÿÿÿÿ1.578ÿÿÿ.0896089ÿÿÿÿ17.61ÿÿÿ0.000ÿÿÿÿÿ1.387311ÿÿÿÿ1.768689
          ------------------------------------------------------------------------------

          ------------------------------------------------------------------------------
          ÿÿRandom-effectsÿparametersÿÿ|ÿÿÿEstimateÿÿÿStd.ÿerr.ÿÿÿÿÿ[95%ÿconf.ÿinterval]
          -----------------------------+------------------------------------------------
          pid:ÿIdentityÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ|
          ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿvar(_cons)ÿ|ÿÿÿ.0539757ÿÿÿ.0286026ÿÿÿÿÿÿ.0191044ÿÿÿÿ.1524978
          -----------------------------+------------------------------------------------
          ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿvar(Residual)ÿ|ÿÿÿ.0263218ÿÿÿ.0071639ÿÿÿÿÿÿÿÿ.01544ÿÿÿÿ.0448728
          ------------------------------------------------------------------------------

          .ÿestimatesÿstoreÿANOVA

          .ÿcontrastÿp.tim,ÿsmallÿpveffectsÿnowald

          Contrastsÿofÿmarginalÿlinearÿpredictions

          Margins:ÿasbalanced

          -------------------------------------------------------------------
          ÿÿÿÿÿÿÿÿÿÿÿÿÿ|ÿÿÿContrastÿÿÿStd.ÿerr.ÿÿÿÿÿÿÿÿÿÿÿdfÿÿÿÿÿÿÿtÿÿÿÿP>|t|
          -------------+-----------------------------------------------------
          scoÿÿÿÿÿÿÿÿÿÿ|
          ÿÿÿÿÿÿÿÿÿtimÿ|
          ÿÿÿ(linear)ÿÿ|ÿÿ-.1201887ÿÿÿ.0256524ÿÿÿÿÿÿÿÿÿÿ27.0ÿÿÿÿ-4.69ÿÿÿ0.000
          (quadratic)ÿÿ|ÿÿÿÿ-.01875ÿÿÿ.0256524ÿÿÿÿÿÿÿÿÿÿ27.0ÿÿÿÿ-0.73ÿÿÿ0.471
          ÿÿÿÿ(cubic)ÿÿ|ÿÿÿ.0150935ÿÿÿ.0256524ÿÿÿÿÿÿÿÿÿÿ27.0ÿÿÿÿÿ0.59ÿÿÿ0.561
          -------------------------------------------------------------------

          .ÿ
          .ÿ//ÿCategoricalÿtime--MANOVA
          .ÿmixedÿscoÿi.timÿ||ÿpid:ÿ,ÿnoconstantÿresiduals(unstructured,ÿt(tim))ÿ///
          >ÿÿÿÿÿÿÿÿÿremlÿdfmethod(kroger)ÿnolrtestÿnolog

          Mixed-effectsÿREMLÿregressionÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿNumberÿofÿobsÿÿÿÿÿ=ÿÿÿÿÿÿÿÿÿ40
          Groupÿvariable:ÿpidÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿNumberÿofÿgroupsÿÿ=ÿÿÿÿÿÿÿÿÿ10
          ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿObsÿperÿgroup:
          ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿminÿ=ÿÿÿÿÿÿÿÿÿÿ4
          ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿavgÿ=ÿÿÿÿÿÿÿÿ4.0
          ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿmaxÿ=ÿÿÿÿÿÿÿÿÿÿ4
          DFÿmethod:ÿKenward–RogerÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿDF:ÿÿÿÿÿÿÿÿÿÿÿminÿ=ÿÿÿÿÿÿÿ9.00
          ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿavgÿ=ÿÿÿÿÿÿÿ9.00
          ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿmaxÿ=ÿÿÿÿÿÿÿ9.00
          ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿF(3,ÿÿÿÿÿ7.00)ÿÿÿÿ=ÿÿÿÿÿÿÿ4.84
          Logÿrestricted-likelihoodÿ=ÿÿ.91479707ÿÿÿÿÿÿÿÿÿÿProbÿ>ÿFÿÿÿÿÿÿÿÿÿÿ=ÿÿÿÿÿ0.0396

          ------------------------------------------------------------------------------
          ÿÿÿÿÿÿÿÿÿscoÿ|ÿCoefficientÿÿStd.ÿerr.ÿÿÿÿÿÿtÿÿÿÿP>|t|ÿÿÿÿÿ[95%ÿconf.ÿinterval]
          -------------+----------------------------------------------------------------
          ÿÿÿÿÿÿÿÿÿtimÿ|
          ÿÿÿÿÿÿÿÿÿÿ1ÿÿ|ÿÿÿÿÿÿ-.043ÿÿÿ.0739377ÿÿÿÿ-0.58ÿÿÿ0.575ÿÿÿÿ-.2102586ÿÿÿÿ.1242586
          ÿÿÿÿÿÿÿÿÿÿ2ÿÿ|ÿÿÿÿÿÿ-.191ÿÿÿÿ.068499ÿÿÿÿ-2.79ÿÿÿ0.021ÿÿÿÿ-.3459555ÿÿÿ-.0360445
          ÿÿÿÿÿÿÿÿÿÿ3ÿÿ|ÿÿÿÿÿÿ-.309ÿÿÿ.0843992ÿÿÿÿ-3.66ÿÿÿ0.005ÿÿÿÿ-.4999242ÿÿÿ-.1180758
          ÿÿÿÿÿÿÿÿÿÿÿÿÿ|
          ÿÿÿÿÿÿÿ_consÿ|ÿÿÿÿÿÿ1.578ÿÿÿ.0765187ÿÿÿÿ20.62ÿÿÿ0.000ÿÿÿÿÿ1.404903ÿÿÿÿ1.751097
          ------------------------------------------------------------------------------

          ------------------------------------------------------------------------------
          ÿÿRandom-effectsÿparametersÿÿ|ÿÿÿEstimateÿÿÿStd.ÿerr.ÿÿÿÿÿ[95%ÿconf.ÿinterval]
          -----------------------------+------------------------------------------------
          pid:ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ(empty)ÿ|
          -----------------------------+------------------------------------------------
          Residual:ÿUnstructuredÿÿÿÿÿÿÿ|
          ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿvar(e0)ÿ|ÿÿÿ.0585511ÿÿÿ.0276012ÿÿÿÿÿÿ.0232421ÿÿÿÿ.1475007
          ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿvar(e1)ÿ|ÿÿÿ.0917833ÿÿÿ.0432671ÿÿÿÿÿÿ.0364337ÿÿÿÿ.2312197
          ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿvar(e2)ÿ|ÿÿÿ.0719344ÿÿÿ.0339103ÿÿÿÿÿÿ.0285546ÿÿÿÿ.1812166
          ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿvar(e3)ÿ|ÿÿÿ.0989211ÿÿÿÿ.046632ÿÿÿÿÿÿÿ.039267ÿÿÿÿ.2492012
          ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿcov(e0,e1)ÿ|ÿÿÿ.0478333ÿÿÿ.0291777ÿÿÿÿÿ-.0093539ÿÿÿÿ.1050206
          ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿcov(e0,e2)ÿ|ÿÿÿ.0417822ÿÿÿ.0257285ÿÿÿÿÿ-.0086447ÿÿÿÿ.0922091
          ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿcov(e0,e3)ÿ|ÿÿÿÿÿ.04312ÿÿÿ.0291572ÿÿÿÿÿ-.0140271ÿÿÿÿ.1002671
          ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿcov(e1,e2)ÿ|ÿÿÿ.0597278ÿÿÿ.0336152ÿÿÿÿÿ-.0061568ÿÿÿÿ.1256124
          ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿcov(e1,e3)ÿ|ÿÿÿ.0686167ÿÿÿ.0391403ÿÿÿÿÿ-.0080968ÿÿÿÿ.1453302
          ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿcov(e2,e3)ÿ|ÿÿÿ.0627744ÿÿÿÿÿ.03505ÿÿÿÿÿ-.0059223ÿÿÿÿ.1314712
          ------------------------------------------------------------------------------

          .ÿcontrastÿtim,ÿsmall

          Contrastsÿofÿmarginalÿlinearÿpredictions

          Margins:ÿasbalanced

          -----------------------------------------------------------
          ÿÿÿÿÿÿÿÿÿÿÿÿÿ|ÿÿÿÿÿÿÿÿÿdfÿÿÿÿÿÿÿÿddfÿÿÿÿÿÿÿÿÿÿÿFÿÿÿÿÿÿÿÿP>F
          -------------+---------------------------------------------
          scoÿÿÿÿÿÿÿÿÿÿ|
          ÿÿÿÿÿÿÿÿÿtimÿ|ÿÿÿÿÿÿÿÿÿÿ3ÿÿÿÿÿÿÿ7.00ÿÿÿÿÿÿÿÿ4.84ÿÿÿÿÿ0.0396
          -----------------------------------------------------------

          .ÿlocalÿline_sizeÿ`c(linesize)'

          .ÿsetÿlinesizeÿ80

          .ÿlrtestÿANOVA

          Likelihood-ratioÿtest
          Assumption:ÿANOVAÿnestedÿwithinÿ.

          ÿLRÿchi2(8)ÿ=ÿÿÿ2.23
          Probÿ>ÿchi2ÿ=ÿ0.9730

          Note:ÿTheÿreportedÿdegreesÿofÿfreedomÿassumesÿtheÿnullÿhypothesisÿisÿnotÿon
          ÿÿÿÿÿÿtheÿboundaryÿofÿtheÿparameterÿspace.ÿIfÿthisÿisÿnotÿtrue,ÿthenÿthe
          ÿÿÿÿÿÿreportedÿtestÿisÿconservative.
          Note:ÿLRÿtestsÿbasedÿonÿREMLÿareÿvalidÿonlyÿwhenÿtheÿfixed-effects
          ÿÿÿÿÿÿspecificationÿisÿidenticalÿforÿbothÿmodels.

          .ÿsetÿlinesizeÿ`line_size'

          .ÿ
          .ÿxtlineÿsco,ÿi(pid)ÿt(tim)ÿlcolor(black)ÿbyopts(rows(2))ÿ///
          >ÿÿÿÿÿÿÿÿÿylabel(ÿ,ÿformat(%03.1f)ÿangle(horizontal)ÿnogrid)

          .ÿquietlyÿgraphÿexportÿLattice.png,ÿreplace

          .ÿ
          .ÿexit

          endÿofÿdo-file


          .


          Though I guess the clear visual of the margins plot using time as categorical variable shows an obvious trend down . . . I just want to improve my understanding so as to not report my assessment in error.
          I suppose that the dataset provides a good opportunity to learn the mechanics of -mixed- and its postestimation commands, but given the limitations of your study design here, I probably wouldn't go much beyond a lattice plot in assessment of the drug's efficacy and its reporting.

          Click image for larger version

Name:	Lattice.png
Views:	1
Size:	28.7 KB
ID:	1658139

          Comment

          Working...
          X