Announcement

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

  • Multilevel Mixed modelling

    Hi there,

    I am new to the STATA program (and forum), so excuse me if my question sounds unclear/vague.
    I formerly used SPSS and now switched to STATA but I am absolutely no statistical genius.

    I would like to do an analysis on a relatively small dataset of 53 subjects.
    • Each subjects had echocardiography measurements on 3 separate time points (PRE-BL-FU titled in my database)
    • At each time point, 7 longitudinal measurements were made (meaning I measured the longitudinal change in an echocardiographic parameter on 7 fixed intervals and this was repeated at three different time points PRE-BL-FU)
    • I would like to view these changes between the 7 intervals but also between the three time points for each interval.
    • I already switched from a wide to a long dataset. I was planning to use repeated ANOVA for the changes between the 7 intervals with posthoc Bonferroni testing and do the same for each interval separately for the three time points, also with post hoc Bonferroni testing.
    • Now I read that it is better to do mixed modelling for this purpose? Collegues told me to use mixed modelling with FDR post hoc testing?
    1. Which statistical test/tool/code should I use for this purpose in STATA? Apologies if this sounds vague I have attached a picture of the first columns of the dataset?
    For instance,
    Column 1 = IDvariable
    Column 2 = ‘7 intervals', labeled Phase
    Column 3 = Point in time (PRE-BL-FU) (PRE comes first in time, than BL, than FU), labeled Rhythm
    Column 4= is the parameter which I want to evaluate labeled AA

    2. In the next step I would like to subdivide results even further basesd on column 5, labeled EROA --> this is a binary variable)
    3. In the final step I would like to draw the longitudinal changes between the seven intervals with mean+SD with three separate curves (the three time points).
    (Ideally I’d like to draw 8 points with point 8 again being identical to point 1 to complicate things)

    I hope I am a little bit clear.
    Thank you very much in advance,


    Attached Files

  • #2
    This is how to give a data example.

    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input str2 IDvariable byte Phase str3 Rhythm double AA byte EROA
    "1"  1 "BL"   9.67 0
    "1"  1 "FU"   9.07 0
    "1"  1 "PRE"  8.44 0
    "1"  2 "BL"   9.09 0
    "1"  2 "FU"   8.86 0
    "1"  2 "PRE"  8.39 0
    "1"  3 "BL"   8.88 0
    "1"  3 "FU"    8.1 0
    "1"  3 "PRE"  8.34 0
    "1"  4 "BL"   7.75 0
    "1"  4 "FU"   6.86 0
    "1"  4 "PRE"  7.32 0
    "1"  5 "BL"   7.81 0
    "1"  5 "FU"   6.87 0
    "1"  5 "PRE"   7.5 0
    "1"  6 "BL"   8.11 0
    "1"  6 "FU"   7.42 0
    "1"  6 "PRE"  7.62 0
    "1"  7 "BL"   8.17 0
    "1"  7 "FU"   8.02 0
    "1"  7 "PRE"  7.78 0
    "10" 1 "BL"  12.17 1
    "10" 1 "FU"  12.16 1
    "10" 1 "PRE" 11.42 1
    "10" 2 "BL"  11.97 1
    "10" 2 "FU"  11.23 1
    "10" 2 "PRE" 11.29 1
    "10" 3 "BL"  11.32 1
    "10" 3 "FU"  10.97 1
    "10" 3 "PRE" 11.02 1
    "10" 4 "BL"  10.68 1
    "10" 4 "FU"    9.9 1
    "10" 4 "PRE" 11.06 1
    "10" 5 "BL"  10.76 1
    "10" 5 "FU"  10.02 1
    "10" 5 "PRE" 11.04 1
    "10" 6 "BL"  11.06 1
    "10" 6 "FU"  10.41 1
    "10" 6 "PRE" 11.29 1
    "10" 7 "BL"  11.24 1
    "10" 7 "FU"  10.73 1
    "10" 7 "PRE" 11.65 1
    "11" 1 "BL"  17.51 1
    "11" 1 "FU"  17.69 1
    "11" 1 "PRE" 17.17 1
    "11" 2 "BL"  16.66 1
    "11" 2 "FU"  16.13 1
    "11" 2 "PRE" 16.55 1
    "11" 3 "BL"  15.34 1
    "11" 3 "FU"  15.31 1
    "11" 3 "PRE" 15.46 1
    "11" 4 "BL"  14.82 1
    "11" 4 "FU"  14.72 1
    "11" 4 "PRE" 15.22 1
    "11" 5 "BL"  14.87 1
    "11" 5 "FU"   14.8 1
    "11" 5 "PRE" 15.15 1
    "11" 6 "BL"  15.75 1
    "11" 6 "FU"  15.07 1
    "11" 6 "PRE" 15.49 1
    "11" 7 "BL"  16.19 1
    "11" 7 "FU"  15.51 1
    "11" 7 "PRE" 15.59 1
    "12" 1 "BL"  14.28 1
    "12" 1 "FU"  13.26 1
    "12" 1 "PRE" 14.02 1
    "12" 2 "BL"  13.88 1
    "12" 2 "FU"  12.93 1
    "12" 2 "PRE" 13.76 1
    "12" 3 "BL"  13.49 1
    "12" 3 "FU"  11.96 1
    "12" 3 "PRE" 13.42 1
    "12" 4 "BL"   12.9 1
    "12" 4 "FU"  11.29 1
    "12" 4 "PRE" 13.11 1
    "12" 5 "BL"  12.96 1
    "12" 5 "FU"   11.3 1
    "12" 5 "PRE" 13.16 1
    "12" 6 "BL"     13 1
    "12" 6 "FU"  11.78 1
    "12" 6 "PRE" 13.17 1
    "12" 7 "BL"  12.91 1
    "12" 7 "FU"  11.81 1
    "12" 7 "PRE" 13.39 1
    "13" 1 "BL"  14.33 0
    "13" 1 "FU"  14.36 0
    "13" 1 "PRE" 14.96 0
    "13" 2 "BL"  14.13 0
    "13" 2 "FU"  13.93 0
    "13" 2 "PRE" 14.17 0
    "13" 3 "BL"   13.9 0
    "13" 3 "FU"  13.72 0
    "13" 3 "PRE" 13.89 0
    "13" 4 "BL"  13.36 0
    "13" 4 "FU"  11.82 0
    "13" 4 "PRE" 13.01 0
    "13" 5 "BL"  13.17 0
    "13" 5 "FU"  11.99 0
    "13" 5 "PRE" 13.24 0
    "13" 6 "BL"  14.75 0
    end
    For more advice please see

    https://www.statalist.org/forums/help#realnames

    https://www.statalist.org/forums/help#stata

    https://www.statalist.org/forums/help#spelling

    Last edited by Nick Cox; 17 Mar 2020, 06:25.

    Comment


    • #3
      My apologies, didn't know that.
      I have tried dataex which works

      input str2 IDvariable byte Phase str3 Rhythm double AA byte EROA
      "1" 1 "BL" 9.67 0
      "1" 1 "FU" 9.07 0
      "1" 1 "PRE" 8.44 0
      "1" 2 "BL" 9.09 0
      "1" 2 "FU" 8.86 0
      "1" 2 "PRE" 8.39 0
      "1" 3 "BL" 8.88 0
      "1" 3 "FU" 8.1 0
      "1" 3 "PRE" 8.34 0
      "1" 4 "BL" 7.75 0
      "1" 4 "FU" 6.86 0
      "1" 4 "PRE" 7.32 0
      "1" 5 "BL" 7.81 0
      "1" 5 "FU" 6.87 0
      "1" 5 "PRE" 7.5 0
      "1" 6 "BL" 8.11 0
      "1" 6 "FU" 7.42 0
      "1" 6 "PRE" 7.62 0
      "1" 7 "BL" 8.17 0
      "1" 7 "FU" 8.02 0
      "1" 7 "PRE" 7.78 0
      "10" 1 "BL" 12.17 1
      "10" 1 "FU" 12.16 1
      "10" 1 "PRE" 11.42 1
      "10" 2 "BL" 11.97 1
      "10" 2 "FU" 11.23 1
      "10" 2 "PRE" 11.29 1
      "10" 3 "BL" 11.32 1
      "10" 3 "FU" 10.97 1
      "10" 3 "PRE" 11.02 1
      "10" 4 "BL" 10.68 1
      "10" 4 "FU" 9.9 1
      "10" 4 "PRE" 11.06 1
      "10" 5 "BL" 10.76 1
      "10" 5 "FU" 10.02 1
      "10" 5 "PRE" 11.04 1
      "10" 6 "BL" 11.06 1
      "10" 6 "FU" 10.41 1
      "10" 6 "PRE" 11.29 1
      "10" 7 "BL" 11.24 1
      "10" 7 "FU" 10.73 1
      "10" 7 "PRE" 11.65 1
      "11" 1 "BL" 17.51 1
      "11" 1 "FU" 17.69 1
      "11" 1 "PRE" 17.17 1
      "11" 2 "BL" 16.66 1
      "11" 2 "FU" 16.13 1
      "11" 2 "PRE" 16.55 1
      "11" 3 "BL" 15.34 1
      "11" 3 "FU" 15.31 1
      "11" 3 "PRE" 15.46 1
      "11" 4 "BL" 14.82 1
      "11" 4 "FU" 14.72 1
      "11" 4 "PRE" 15.22 1
      "11" 5 "BL" 14.87 1
      "11" 5 "FU" 14.8 1
      "11" 5 "PRE" 15.15 1
      "11" 6 "BL" 15.75 1
      "11" 6 "FU" 15.07 1
      "11" 6 "PRE" 15.49 1
      "11" 7 "BL" 16.19 1
      "11" 7 "FU" 15.51 1
      "11" 7 "PRE" 15.59 1
      "12" 1 "BL" 14.28 1
      "12" 1 "FU" 13.26 1
      "12" 1 "PRE" 14.02 1
      "12" 2 "BL" 13.88 1
      "12" 2 "FU" 12.93 1
      "12" 2 "PRE" 13.76 1
      "12" 3 "BL" 13.49 1
      "12" 3 "FU" 11.96 1
      "12" 3 "PRE" 13.42 1
      "12" 4 "BL" 12.9 1
      "12" 4 "FU" 11.29 1
      "12" 4 "PRE" 13.11 1
      "12" 5 "BL" 12.96 1
      "12" 5 "FU" 11.3 1
      "12" 5 "PRE" 13.16 1
      "12" 6 "BL" 13 1
      "12" 6 "FU" 11.78 1
      "12" 6 "PRE" 13.17 1
      "12" 7 "BL" 12.91 1
      "12" 7 "FU" 11.81 1
      "12" 7 "PRE" 13.39 1
      "13" 1 "BL" 14.33 0
      "13" 1 "FU" 14.36 0
      "13" 1 "PRE" 14.96 0
      "13" 2 "BL" 14.13 0
      "13" 2 "FU" 13.93 0
      "13" 2 "PRE" 14.17 0
      "13" 3 "BL" 13.9 0
      "13" 3 "FU" 13.72 0
      "13" 3 "PRE" 13.89 0
      "13" 4 "BL" 13.36 0
      "13" 4 "FU" 11.82 0
      "13" 4 "PRE" 13.01 0
      "13" 5 "BL" 13.17 0
      "13" 5 "FU" 11.99 0
      "13" 5 "PRE" 13.24 0
      "13" 6 "BL" 14.75 0
      end
      [/CODE]

      Comment


      • #4
        Anybody know the answer? :-)

        Comment

        Working...
        X