Announcement

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

  • How to report the results of a mixed effects model?


    Hi to everybody, how to report the results of a mixed effects model?Can I explain better how to write if there is a diagnosis effect, a time effect and an interaction effect? ​​and therefore how to write the statistics? Thank you very much in advance everyone.
    Below my output and my post-hoc





    xtmixed RITIRO_sociale Diagnosi_numbis##timepoint || progressivo_soggetto:, var reml

    Performing EM optimization:

    Performing gradient-based optimization:

    Iteration 0: Log restricted-likelihood = -1015.2903
    Iteration 1: Log restricted-likelihood = -1015.2802
    Iteration 2: Log restricted-likelihood = -1015.2802

    Computing standard errors:

    Mixed-effects REML regression Number of obs = 342
    Group variable: progressivo_~o Number of groups = 190
    Obs per group:
    min = 1
    avg = 1.8
    max = 2
    Wald chi2(7) = 49.03
    Log restricted-likelihood = -1015.2802 Prob > chi2 = 0.00000



    -------------------------------------------------------------------------------------------
    RITIRO_sociale | Coefficient Std. err. z P>|z| [95% conf. interval]
    --------------------------+----------------------------------------------------------------
    Diagnosi_numbis |
    2 | 1.146703 1.105662 1.04 0.300 -1.020354 3.313759
    3 | 3.41232 1.229787 2.77 0.006 1.001982 5.822659
    4 | 4.544643 1.593348 2.85 0.004 1.421738 7.667548
    |
    24.timepoint | .7807385 1.029916 0.76 0.448 -1.237861 2.799338
    |
    Diagnosi_numbis#timepoint |
    2 24 | -.1016103 1.188776 -0.09 0.932 -2.431569 2.228349
    3 24 | -.2780768 1.340183 -0.21 0.836 -2.904788 2.348634
    4 24 | 4.972854 1.780246 2.79 0.005 1.483636 8.462072
    |
    _cons | 50.14286 .960825 52.19 0.000 48.25967 52.02604
    -------------------------------------------------------------------------------------------

    ------------------------------------------------------------------------------
    Random-effects parameters | Estimate Std. err. [95% conf. interval]
    -----------------------------+------------------------------------------------
    progressiv~o: Identity |
    var(_cons) | 11.38482 2.378743 7.559202 17.14652
    -----------------------------+------------------------------------------------
    var(Residual) | 14.46436 1.736417 11.43179 18.3014
    ------------------------------------------------------------------------------
    LR test vs. linear model: chibar2(01) = 26.97 Prob >= chibar2 = 0.0000


    estat ic

    Akaike's information criterion and Bayesian information criterion

    -----------------------------------------------------------------------------
    Model | N ll(null) ll(model) df AIC BIC
    -------------+---------------------------------------------------------------
    . | 342 . -1015.28 10 2050.56 2088.908
    -----------------------------------------------------------------------------
    Note: BIC uses N = number of observations. See [R] IC note.




    contrast timepoint@Diagnosi, effect

    Contrasts of marginal linear predictions

    Margins: asbalanced

    -------------------------------------------------------------
    | df chi2 P>chi2
    --------------------------+----------------------------------
    RITIRO_sociale |
    timepoint@Diagnosi_numbis |
    1 | 1 0.57 0.4484
    2 | 1 1.31 0.2527
    3 | 1 0.34 0.5578
    4 | 1 15.70 0.0001
    Joint | 4 17.93 0.0013
    -------------------------------------------------------------

    -------------------------------------------------------------------------------------------
    | Contrast Std. err. z P>|z| [95% conf. interval]
    --------------------------+----------------------------------------------------------------
    RITIRO_sociale |
    timepoint@Diagnosi_numbis |
    (24 vs base) 1 | .7807385 1.029916 0.76 0.448 -1.237861 2.799338
    (24 vs base) 2 | .6791281 .5936846 1.14 0.253 -.4844723 1.842729
    (24 vs base) 3 | .5026616 .8575333 0.59 0.558 -1.178073 2.183396
    (24 vs base) 4 | 5.753593 1.452084 3.96 0.000 2.90756 8.599625
    -------------------------------------------------------------------------------------------


    . margins timepoint, at(Diagnosi_numbis=1) pwcompare(effects) mcompare(bonferroni)

    Pairwise comparisons of adjusted predictions Number of obs = 342

    Expression: Linear prediction, fixed portion, predict()
    At: Diagnosi_numbis = 1

    note: option bonferroni ignored since there is only one comparison
    ------------------------------------------------------------------------------
    | Delta-method Unadjusted Unadjusted
    | Contrast std. err. z P>|z| [95% conf. interval]
    -------------+----------------------------------------------------------------
    timepoint |
    24 vs 18 | .7807385 1.029916 0.76 0.448 -1.237861 2.799338
    ------------------------------------------------------------------------------

    . margins timepoint, at(Diagnosi_numbis=2) pwcompare(effects) mcompare(bonferroni)

    Pairwise comparisons of adjusted predictions Number of obs = 342

    Expression: Linear prediction, fixed portion, predict()
    At: Diagnosi_numbis = 2

    note: option bonferroni ignored since there is only one comparison
    ------------------------------------------------------------------------------
    | Delta-method Unadjusted Unadjusted
    | Contrast std. err. z P>|z| [95% conf. interval]
    -------------+----------------------------------------------------------------
    timepoint |
    24 vs 18 | .6791281 .5936846 1.14 0.253 -.4844723 1.842729
    ------------------------------------------------------------------------------

    . margins timepoint, at(Diagnosi_numbis=3) pwcompare(effects) mcompare(bonferroni)

    Pairwise comparisons of adjusted predictions Number of obs = 342

    Expression: Linear prediction, fixed portion, predict()
    At: Diagnosi_numbis = 3

    note: option bonferroni ignored since there is only one comparison
    ------------------------------------------------------------------------------
    | Delta-method Unadjusted Unadjusted
    | Contrast std. err. z P>|z| [95% conf. interval]
    -------------+----------------------------------------------------------------
    timepoint |
    24 vs 18 | .5026616 .8575333 0.59 0.558 -1.178073 2.183396
    ------------------------------------------------------------------------------

    . margins timepoint, at(Diagnosi_numbis=4) pwcompare(effects) mcompare(bonferroni)

    Pairwise comparisons of adjusted predictions Number of obs = 342

    Expression: Linear prediction, fixed portion, predict()
    At: Diagnosi_numbis = 4

    note: option bonferroni ignored since there is only one comparison
    ------------------------------------------------------------------------------
    | Delta-method Unadjusted Unadjusted
    | Contrast std. err. z P>|z| [95% conf. interval]
    -------------+----------------------------------------------------------------
    timepoint |
    24 vs 18 | 5.753593 1.452084 3.96 0.000 2.90756 8.599625
    ------------------------------------------------------------------------------

    .


    contrast Diagnosi_numbis@timepoint, effect mcompare(bonferroni)

    Contrasts of marginal linear predictions

    Margins: asbalanced

    -------------------------------------------------------------
    | df chi2 P>chi2
    --------------------------+----------------------------------
    RITIRO_sociale |
    Diagnosi_numbis@timepoint |
    18 | 3 14.00 0.0029
    24 | 3 39.01 0.0000
    Joint | 6 43.26 0.0000
    -------------------------------------------------------------
    Note: Bonferroni-adjusted p-values are reported for tests on
    individual contrasts only.

    ----------------------------------------
    | Number of
    | comparisons
    --------------------------+-------------
    RITIRO_sociale |
    Diagnosi_numbis@timepoint | 6
    ----------------------------------------

    -------------------------------------------------------------------------------------------
    | Bonferroni Bonferroni
    | Contrast Std. err. z P>|z| [95% conf. interval]
    --------------------------+----------------------------------------------------------------
    RITIRO_sociale |
    Diagnosi_numbis@timepoint |
    (2 vs base) 18 | 1.146703 1.105662 1.04 1.000 -1.770317 4.063722
    (2 vs base) 24 | 1.045092 1.110614 0.94 1.000 -1.884993 3.975178
    (3 vs base) 18 | 3.41232 1.229787 2.77 0.033 .1678253 6.656815
    (3 vs base) 24 | 3.134243 1.250465 2.51 0.073 -.1648054 6.433292
    (4 vs base) 18 | 4.544643 1.593348 2.85 0.026 .3409807 8.748305
    (4 vs base) 24 | 9.517497 1.693169 5.62 0.000 5.050481 13.98451
    -------------------------------------------------------------------------------------------

    .


    .margins Diagnosi_numbis, at(timepoint=18) pwcompare(effects) mcompare(bonferroni)

    Pairwise comparisons of adjusted predictions Number of obs = 342

    Expression: Linear prediction, fixed portion, predict()
    At: timepoint = 18

    ------------------------------
    | Number of
    | comparisons
    ----------------+-------------
    Diagnosi_numbis | 6
    ------------------------------

    ---------------------------------------------------------------------------------
    | Delta-method Bonferroni Bonferroni
    | Contrast std. err. z P>|z| [95% conf. interval]
    ----------------+----------------------------------------------------------------
    Diagnosi_numbis |
    2 vs 1 | 1.146703 1.105662 1.04 1.000 -1.770317 4.063722
    3 vs 1 | 3.41232 1.229787 2.77 0.033 .1678253 6.656815
    4 vs 1 | 4.544643 1.593348 2.85 0.026 .3409807 8.748305
    3 vs 2 | 2.265618 .9425999 2.40 0.097 -.2212033 4.752439
    4 vs 2 | 3.39794 1.38379 2.46 0.084 -.252855 7.048736
    4 vs 3 | 1.132323 1.484845 0.76 1.000 -2.785081 5.049726
    ---------------------------------------------------------------------------------

    . margins Diagnosi_numbis, at(timepoint=24) pwcompare(effects) mcompare(bonferroni)

    Pairwise comparisons of adjusted predictions Number of obs = 342

    Expression: Linear prediction, fixed portion, predict()
    At: timepoint = 24

    ------------------------------
    | Number of
    | comparisons
    ----------------+-------------
    Diagnosi_numbis | 6
    ------------------------------

    ---------------------------------------------------------------------------------
    | Delta-method Bonferroni Bonferroni
    | Contrast std. err. z P>|z| [95% conf. interval]
    ----------------+----------------------------------------------------------------
    Diagnosi_numbis |
    2 vs 1 | 1.045092 1.110614 0.94 1.000 -1.884993 3.975178
    3 vs 1 | 3.134243 1.250465 2.51 0.073 -.1648054 6.433292
    4 vs 1 | 9.517497 1.693169 5.62 0.000 5.050481 13.98451
    3 vs 2 | 2.089151 .9463817 2.21 0.164 -.4076473 4.58595
    4 vs 2 | 8.472405 1.482834 5.71 0.000 4.560307 12.3845
    4 vs 3 | 6.383253 1.590282 4.01 0.000 2.187681 10.57883
    ---------------------------------------------------------------------------------



  • #2
    sorry i write again the output





    xtmixed RITIRO_sociale Diagnosi_numbis##timepoint || progressivo_soggetto:, var reml

    Performing EM optimization:

    Performing gradient-based optimization:

    Iteration 0: Log restricted-likelihood = -1015.2903
    Iteration 1: Log restricted-likelihood = -1015.2802
    Iteration 2: Log restricted-likelihood = -1015.2802

    Computing standard errors:

    Mixed-effects REML regression Number of obs = 342
    Group variable: progressivo_~o Number of groups = 190
    Obs per group:
    min = 1
    avg = 1.8
    max = 2
    Wald chi2(7) = 49.03
    Log restricted-likelihood = -1015.2802 Prob > chi2 = 0.00000



    -------------------------------------------------------------------------------------------
    RITIRO_sociale | Coefficient Std. err. z P>|z| [95% conf. interval]
    --------------------------+----------------------------------------------------------------
    Diagnosi_numbis |
    2 | 1.146703 1.105662 1.04 0.300 -1.020354 3.313759
    3 | 3.41232 1.229787 2.77 0.006 1.001982 5.822659
    4 | 4.544643 1.593348 2.85 0.004 1.421738 7.667548
    |
    24.timepoint | .7807385 1.029916 0.76 0.448 -1.237861 2.799338
    |
    Diagnosi_numbis#timepoint |
    2 24 | -.1016103 1.188776 -0.09 0.932 -2.431569 2.228349
    3 24 | -.2780768 1.340183 -0.21 0.836 -2.904788 2.348634
    4 24 | 4.972854 1.780246 2.79 0.005 1.483636 8.462072
    |
    _cons | 50.14286 .960825 52.19 0.000 48.25967 52.02604
    -------------------------------------------------------------------------------------------

    ------------------------------------------------------------------------------
    Random-effects parameters | Estimate Std. err. [95% conf. interval]
    -----------------------------+------------------------------------------------
    progressiv~o: Identity |
    var(_cons) | 11.38482 2.378743 7.559202 17.14652
    -----------------------------+------------------------------------------------
    var(Residual) | 14.46436 1.736417 11.43179 18.3014
    ------------------------------------------------------------------------------
    LR test vs. linear model: chibar2(01) = 26.97 Prob >= chibar2 = 0.0000


    estat ic

    Akaike's information criterion and Bayesian information criterion

    -----------------------------------------------------------------------------
    Model | N ll(null) ll(model) df AIC BIC
    -------------+---------------------------------------------------------------
    . | 342 . -1015.28 10 2050.56 2088.908
    -----------------------------------------------------------------------------
    Note: BIC uses N = number of observations. See [R] IC note.




    contrast timepoint@Diagnosi, effect

    Contrasts of marginal linear predictions

    Margins: asbalanced

    -------------------------------------------------------------
    | df chi2 P>chi2
    --------------------------+----------------------------------
    RITIRO_sociale |
    timepoint@Diagnosi_numbis |
    1 | 1 0.57 0.4484
    2 | 1 1.31 0.2527
    3 | 1 0.34 0.5578
    4 | 1 15.70 0.0001
    Joint | 4 17.93 0.0013
    -------------------------------------------------------------

    -------------------------------------------------------------------------------------------
    | Contrast Std. err. z P>|z| [95% conf. interval]
    --------------------------+----------------------------------------------------------------
    RITIRO_sociale |
    timepoint@Diagnosi_numbis |
    (24 vs base) 1 | .7807385 1.029916 0.76 0.448 -1.237861 2.799338
    (24 vs base) 2 | .6791281 .5936846 1.14 0.253 -.4844723 1.842729
    (24 vs base) 3 | .5026616 .8575333 0.59 0.558 -1.178073 2.183396
    (24 vs base) 4 | 5.753593 1.452084 3.96 0.000 2.90756 8.599625
    -------------------------------------------------------------------------------------------


    . margins timepoint, at(Diagnosi_numbis=1) pwcompare(effects) mcompare(bonferroni)

    Pairwise comparisons of adjusted predictions Number of obs = 342

    Expression: Linear prediction, fixed portion, predict()
    At: Diagnosi_numbis = 1

    note: option bonferroni ignored since there is only one comparison
    ------------------------------------------------------------------------------
    | Delta-method Unadjusted Unadjusted
    | Contrast std. err. z P>|z| [95% conf. interval]
    -------------+----------------------------------------------------------------
    timepoint |
    24 vs 18 | .7807385 1.029916 0.76 0.448 -1.237861 2.799338
    ------------------------------------------------------------------------------

    . margins timepoint, at(Diagnosi_numbis=2) pwcompare(effects) mcompare(bonferroni)

    Pairwise comparisons of adjusted predictions Number of obs = 342

    Expression: Linear prediction, fixed portion, predict()
    At: Diagnosi_numbis = 2

    note: option bonferroni ignored since there is only one comparison
    ------------------------------------------------------------------------------
    | Delta-method Unadjusted Unadjusted
    | Contrast std. err. z P>|z| [95% conf. interval]
    -------------+----------------------------------------------------------------
    timepoint |
    24 vs 18 | .6791281 .5936846 1.14 0.253 -.4844723 1.842729
    ------------------------------------------------------------------------------

    . margins timepoint, at(Diagnosi_numbis=3) pwcompare(effects) mcompare(bonferroni)

    Pairwise comparisons of adjusted predictions Number of obs = 342

    Expression: Linear prediction, fixed portion, predict()
    At: Diagnosi_numbis = 3

    note: option bonferroni ignored since there is only one comparison
    ------------------------------------------------------------------------------
    | Delta-method Unadjusted Unadjusted
    | Contrast std. err. z P>|z| [95% conf. interval]
    -------------+----------------------------------------------------------------
    timepoint |
    24 vs 18 | .5026616 .8575333 0.59 0.558 -1.178073 2.183396
    ------------------------------------------------------------------------------

    . margins timepoint, at(Diagnosi_numbis=4) pwcompare(effects) mcompare(bonferroni)

    Pairwise comparisons of adjusted predictions Number of obs = 342

    Expression: Linear prediction, fixed portion, predict()
    At: Diagnosi_numbis = 4

    note: option bonferroni ignored since there is only one comparison
    ------------------------------------------------------------------------------
    | Delta-method Unadjusted Unadjusted
    | Contrast std. err. z P>|z| [95% conf. interval]
    -------------+----------------------------------------------------------------
    timepoint |
    24 vs 18 | 5.753593 1.452084 3.96 0.000 2.90756 8.599625
    ------------------------------------------------------------------------------

    .


    contrast Diagnosi_numbis@timepoint, effect mcompare(bonferroni)

    Contrasts of marginal linear predictions

    Margins: asbalanced

    -------------------------------------------------------------
    | df chi2 P>chi2
    --------------------------+----------------------------------
    RITIRO_sociale |
    Diagnosi_numbis@timepoint |
    18 | 3 14.00 0.0029
    24 | 3 39.01 0.0000
    Joint | 6 43.26 0.0000
    -------------------------------------------------------------
    Note: Bonferroni-adjusted p-values are reported for tests on
    individual contrasts only.

    ----------------------------------------
    | Number of
    | comparisons
    --------------------------+-------------
    RITIRO_sociale |
    Diagnosi_numbis@timepoint | 6
    ----------------------------------------

    -------------------------------------------------------------------------------------------
    | Bonferroni Bonferroni
    | Contrast Std. err. z P>|z| [95% conf. interval]
    --------------------------+----------------------------------------------------------------
    RITIRO_sociale |
    Diagnosi_numbis@timepoint |
    (2 vs base) 18 | 1.146703 1.105662 1.04 1.000 -1.770317 4.063722
    (2 vs base) 24 | 1.045092 1.110614 0.94 1.000 -1.884993 3.975178
    (3 vs base) 18 | 3.41232 1.229787 2.77 0.033 .1678253 6.656815
    (3 vs base) 24 | 3.134243 1.250465 2.51 0.073 -.1648054 6.433292
    (4 vs base) 18 | 4.544643 1.593348 2.85 0.026 .3409807 8.748305
    (4 vs base) 24 | 9.517497 1.693169 5.62 0.000 5.050481 13.98451
    -------------------------------------------------------------------------------------------

    .


    .margins Diagnosi_numbis, at(timepoint=18) pwcompare(effects) mcompare(bonferroni)

    Pairwise comparisons of adjusted predictions Number of obs = 342

    Expression: Linear prediction, fixed portion, predict()
    At: timepoint = 18

    ------------------------------
    | Number of
    | comparisons
    ----------------+-------------
    Diagnosi_numbis | 6
    ------------------------------

    ---------------------------------------------------------------------------------
    | Delta-method Bonferroni Bonferroni
    | Contrast std. err. z P>|z| [95% conf. interval]
    ----------------+----------------------------------------------------------------
    Diagnosi_numbis |
    2 vs 1 | 1.146703 1.105662 1.04 1.000 -1.770317 4.063722
    3 vs 1 | 3.41232 1.229787 2.77 0.033 .1678253 6.656815
    4 vs 1 | 4.544643 1.593348 2.85 0.026 .3409807 8.748305
    3 vs 2 | 2.265618 .9425999 2.40 0.097 -.2212033 4.752439
    4 vs 2 | 3.39794 1.38379 2.46 0.084 -.252855 7.048736
    4 vs 3 | 1.132323 1.484845 0.76 1.000 -2.785081 5.049726
    ---------------------------------------------------------------------------------

    . margins Diagnosi_numbis, at(timepoint=24) pwcompare(effects) mcompare(bonferroni)

    Pairwise comparisons of adjusted predictions Number of obs = 342

    Expression: Linear prediction, fixed portion, predict()
    At: timepoint = 24

    ------------------------------
    | Number of
    | comparisons
    ----------------+-------------
    Diagnosi_numbis | 6
    ------------------------------

    ---------------------------------------------------------------------------------
    | Delta-method Bonferroni Bonferroni
    | Contrast std. err. z P>|z| [95% conf. interval]
    ----------------+----------------------------------------------------------------
    Diagnosi_numbis |
    2 vs 1 | 1.045092 1.110614 0.94 1.000 -1.884993 3.975178
    3 vs 1 | 3.134243 1.250465 2.51 0.073 -.1648054 6.433292
    4 vs 1 | 9.517497 1.693169 5.62 0.000 5.050481 13.98451
    3 vs 2 | 2.089151 .9463817 2.21 0.164 -.4076473 4.58595
    4 vs 2 | 8.472405 1.482834 5.71 0.000 4.560307 12.3845
    4 vs 3 | 6.383253 1.590282 4.01 0.000 2.187681 10.57883
    ---------------------------------------------------------------------------------









    Comment


    • #3
      Code:
      xtmixed RITIRO_sociale Diagnosi_numbis##timepoint || progressivo_soggetto:, var reml
      
      Performing EM optimization:
      
      Performing gradient-based optimization:
      
      Iteration 0: Log restricted-likelihood = -1015.2903
      Iteration 1: Log restricted-likelihood = -1015.2802
      Iteration 2: Log restricted-likelihood = -1015.2802
      
      Computing standard errors:
      
      Mixed-effects REML regression Number of obs = 342
      Group variable: progressivo_~o Number of groups = 190
      Obs per group:
      min = 1
      avg = 1.8
      max = 2
      Wald chi2(7) = 49.03
      Log restricted-likelihood = -1015.2802 Prob > chi2 = 0.00000
      
      
      
      -------------------------------------------------------------------------------------------
      RITIRO_sociale | Coefficient Std. err. z P>|z| [95% conf. interval]
      --------------------------+----------------------------------------------------------------
      Diagnosi_numbis |
      2 | 1.146703 1.105662 1.04 0.300 -1.020354 3.313759
      3 | 3.41232 1.229787 2.77 0.006 1.001982 5.822659
      4 | 4.544643 1.593348 2.85 0.004 1.421738 7.667548
      |
      24.timepoint | .7807385 1.029916 0.76 0.448 -1.237861 2.799338
      |
      Diagnosi_numbis#timepoint |
      2 24 | -.1016103 1.188776 -0.09 0.932 -2.431569 2.228349
      3 24 | -.2780768 1.340183 -0.21 0.836 -2.904788 2.348634
      4 24 | 4.972854 1.780246 2.79 0.005 1.483636 8.462072
      |
      _cons | 50.14286 .960825 52.19 0.000 48.25967 52.02604
      -------------------------------------------------------------------------------------------
      
      ------------------------------------------------------------------------------
      Random-effects parameters | Estimate Std. err. [95% conf. interval]
      -----------------------------+------------------------------------------------
      progressiv~o: Identity |
      var(_cons) | 11.38482 2.378743 7.559202 17.14652
      -----------------------------+------------------------------------------------
      var(Residual) | 14.46436 1.736417 11.43179 18.3014
      ------------------------------------------------------------------------------
      LR test vs. linear model: chibar2(01) = 26.97 Prob >= chibar2 = 0.0000
      
      
      estat ic
      
      Akaike's information criterion and Bayesian information criterion
      
      -----------------------------------------------------------------------------
      Model | N ll(null) ll(model) df AIC BIC
      -------------+---------------------------------------------------------------
      . | 342 . -1015.28 10 2050.56 2088.908
      -----------------------------------------------------------------------------
      Note: BIC uses N = number of observations. See [R] IC note.
      
      
      
      
      contrast timepoint@Diagnosi, effect
      
      Contrasts of marginal linear predictions
      
      Margins: asbalanced
      
      -------------------------------------------------------------
      | df chi2 P>chi2
      --------------------------+----------------------------------
      RITIRO_sociale |
      timepoint@Diagnosi_numbis |
      1 | 1 0.57 0.4484
      2 | 1 1.31 0.2527
      3 | 1 0.34 0.5578
      4 | 1 15.70 0.0001
      Joint | 4 17.93 0.0013
      -------------------------------------------------------------
      
      -------------------------------------------------------------------------------------------
      | Contrast Std. err. z P>|z| [95% conf. interval]
      --------------------------+----------------------------------------------------------------
      RITIRO_sociale |
      timepoint@Diagnosi_numbis |
      (24 vs base) 1 | .7807385 1.029916 0.76 0.448 -1.237861 2.799338
      (24 vs base) 2 | .6791281 .5936846 1.14 0.253 -.4844723 1.842729
      (24 vs base) 3 | .5026616 .8575333 0.59 0.558 -1.178073 2.183396
      (24 vs base) 4 | 5.753593 1.452084 3.96 0.000 2.90756 8.599625
      -------------------------------------------------------------------------------------------
      
      
      . margins timepoint, at(Diagnosi_numbis=1) pwcompare(effects) mcompare(bonferroni)
      
      Pairwise comparisons of adjusted predictions Number of obs = 342
      
      Expression: Linear prediction, fixed portion, predict()
      At: Diagnosi_numbis = 1
      
      note: option bonferroni ignored since there is only one comparison
      ------------------------------------------------------------------------------
      | Delta-method Unadjusted Unadjusted
      | Contrast std. err. z P>|z| [95% conf. interval]
      -------------+----------------------------------------------------------------
      timepoint |
      24 vs 18 | .7807385 1.029916 0.76 0.448 -1.237861 2.799338
      ------------------------------------------------------------------------------
      
      . margins timepoint, at(Diagnosi_numbis=2) pwcompare(effects) mcompare(bonferroni)
      
      Pairwise comparisons of adjusted predictions Number of obs = 342
      
      Expression: Linear prediction, fixed portion, predict()
      At: Diagnosi_numbis = 2
      
      note: option bonferroni ignored since there is only one comparison
      ------------------------------------------------------------------------------
      | Delta-method Unadjusted Unadjusted
      | Contrast std. err. z P>|z| [95% conf. interval]
      -------------+----------------------------------------------------------------
      timepoint |
      24 vs 18 | .6791281 .5936846 1.14 0.253 -.4844723 1.842729
      ------------------------------------------------------------------------------
      
      . margins timepoint, at(Diagnosi_numbis=3) pwcompare(effects) mcompare(bonferroni)
      
      Pairwise comparisons of adjusted predictions Number of obs = 342
      
      Expression: Linear prediction, fixed portion, predict()
      At: Diagnosi_numbis = 3
      
      note: option bonferroni ignored since there is only one comparison
      ------------------------------------------------------------------------------
      | Delta-method Unadjusted Unadjusted
      | Contrast std. err. z P>|z| [95% conf. interval]
      -------------+----------------------------------------------------------------
      timepoint |
      24 vs 18 | .5026616 .8575333 0.59 0.558 -1.178073 2.183396
      ------------------------------------------------------------------------------
      
      . margins timepoint, at(Diagnosi_numbis=4) pwcompare(effects) mcompare(bonferroni)
      
      Pairwise comparisons of adjusted predictions Number of obs = 342
      
      Expression: Linear prediction, fixed portion, predict()
      At: Diagnosi_numbis = 4
      
      note: option bonferroni ignored since there is only one comparison
      ------------------------------------------------------------------------------
      | Delta-method Unadjusted Unadjusted
      | Contrast std. err. z P>|z| [95% conf. interval]
      -------------+----------------------------------------------------------------
      timepoint |
      24 vs 18 | 5.753593 1.452084 3.96 0.000 2.90756 8.599625
      ------------------------------------------------------------------------------
      
      .
      
      
      contrast Diagnosi_numbis@timepoint, effect mcompare(bonferroni)
      
      Contrasts of marginal linear predictions
      
      Margins: asbalanced
      
      -------------------------------------------------------------
      | df chi2 P>chi2
      --------------------------+----------------------------------
      RITIRO_sociale |
      Diagnosi_numbis@timepoint |
      18 | 3 14.00 0.0029
      24 | 3 39.01 0.0000
      Joint | 6 43.26 0.0000
      -------------------------------------------------------------
      Note: Bonferroni-adjusted p-values are reported for tests on
      individual contrasts only.
      
      ----------------------------------------
      | Number of
      | comparisons
      --------------------------+-------------
      RITIRO_sociale |
      Diagnosi_numbis@timepoint | 6
      ----------------------------------------
      
      -------------------------------------------------------------------------------------------
      | Bonferroni Bonferroni
      | Contrast Std. err. z P>|z| [95% conf. interval]
      --------------------------+----------------------------------------------------------------
      RITIRO_sociale |
      Diagnosi_numbis@timepoint |
      (2 vs base) 18 | 1.146703 1.105662 1.04 1.000 -1.770317 4.063722
      (2 vs base) 24 | 1.045092 1.110614 0.94 1.000 -1.884993 3.975178
      (3 vs base) 18 | 3.41232 1.229787 2.77 0.033 .1678253 6.656815
      (3 vs base) 24 | 3.134243 1.250465 2.51 0.073 -.1648054 6.433292
      (4 vs base) 18 | 4.544643 1.593348 2.85 0.026 .3409807 8.748305
      (4 vs base) 24 | 9.517497 1.693169 5.62 0.000 5.050481 13.98451
      -------------------------------------------------------------------------------------------
      
      .
      
      
      .margins Diagnosi_numbis, at(timepoint=18) pwcompare(effects) mcompare(bonferroni)
      
      Pairwise comparisons of adjusted predictions Number of obs = 342
      
      Expression: Linear prediction, fixed portion, predict()
      At: timepoint = 18
      
      ------------------------------
      | Number of
      | comparisons
      ----------------+-------------
      Diagnosi_numbis | 6
      ------------------------------
      
      ---------------------------------------------------------------------------------
      | Delta-method Bonferroni Bonferroni
      | Contrast std. err. z P>|z| [95% conf. interval]
      ----------------+----------------------------------------------------------------
      Diagnosi_numbis |
      2 vs 1 | 1.146703 1.105662 1.04 1.000 -1.770317 4.063722
      3 vs 1 | 3.41232 1.229787 2.77 0.033 .1678253 6.656815
      4 vs 1 | 4.544643 1.593348 2.85 0.026 .3409807 8.748305
      3 vs 2 | 2.265618 .9425999 2.40 0.097 -.2212033 4.752439
      4 vs 2 | 3.39794 1.38379 2.46 0.084 -.252855 7.048736
      4 vs 3 | 1.132323 1.484845 0.76 1.000 -2.785081 5.049726
      ---------------------------------------------------------------------------------
      
      . margins Diagnosi_numbis, at(timepoint=24) pwcompare(effects) mcompare(bonferroni)
      
      Pairwise comparisons of adjusted predictions Number of obs = 342
      
      Expression: Linear prediction, fixed portion, predict()
      At: timepoint = 24
      
      ------------------------------
      | Number of
      | comparisons
      ----------------+-------------
      Diagnosi_numbis | 6
      ------------------------------
      
      ---------------------------------------------------------------------------------
      | Delta-method Bonferroni Bonferroni
      | Contrast std. err. z P>|z| [95% conf. interval]
      ----------------+----------------------------------------------------------------
      Diagnosi_numbis |
      2 vs 1 | 1.045092 1.110614 0.94 1.000 -1.884993 3.975178
      3 vs 1 | 3.134243 1.250465 2.51 0.073 -.1648054 6.433292
      4 vs 1 | 9.517497 1.693169 5.62 0.000 5.050481 13.98451
      3 vs 2 | 2.089151 .9463817 2.21 0.164 -.4076473 4.58595
      4 vs 2 | 8.472405 1.482834 5.71 0.000 4.560307 12.3845
      4 vs 3 | 6.383253 1.590282 4.01 0.000 2.187681 10.57883
      ---------------------------------------------------------------------------------

      Comment


      • #4
        thanks to everybody for the help

        Comment

        Working...
        X