Hi,
I have a longitudinal study where participants were seen between 1 and 6 times at set appointment times of 18, 24, 30, 36, 48, 60 months (age as continous variable is also available). I am interested to see if there is change over time in the ordinal variable macs (1to5). macs is not normal distribution. How is the best way to look at this ?
----------------------- copy starting from the next line -----------------------
------------------ copy up to and including the previous line ------------------
From my first research, I looked at change over time using long format and used
this showed significant difference in mean macs between 18 months and 24 months but not between other groups
I also looked at it in wide format and used
This gave same result as lincom with significant diff between 18 and 24 months only, showing that there was stability in macs between 30-60 months.
This was the result which I was expecting.
However, it was pointed out to me that macs was not normally distributed, and ordinal (5 level).
Then I was not sure if this is correct (even though it made sense), and so have used
Kappa statistic with the result that there is significant agreement between macs at all ages (including macs18 and macs24)
Expected
Agreement Agreement Kappa Std. Err. Z Prob>Z
-----------------------------------------------------------------
63.33% 22.06% 0.5296 0.0661 8.01 0.0000
Expected
Agreement Agreement Kappa Std. Err. Z Prob>Z
-----------------------------------------------------------------
78.76% 26.91% 0.7094 0.0530 13.39 0.0000
kap macs18 macs24, wgt(w)
Ratings weighted by:
1.0000 0.7500 0.5000 0.2500 0.0000
0.7500 1.0000 0.7500 0.5000 0.2500
0.5000 0.7500 1.0000 0.7500 0.5000
0.2500 0.5000 0.7500 1.0000 0.7500
0.0000 0.2500 0.5000 0.7500 1.0000
Expected Agreement Agreement Kappa Std. Err. Z Prob>Z
-----------------------------------------------------------------
90.42% 62.43% 0.7449 0.0872 8.54 0.0000
I also used Friedman test to look at the difference….
Friedman = 105.6730
Kendall = 0.8955
P-value = 0.0002
Friedman = 193.4080
Kendall = 0.8634
P-value = 0.0000
Friedman = 124.0727
Kendall = 0.8616
P-value = 0.0000
Friedman = 175.0047
Kendall = 0.8334
P-value = 0.0000
So, now I am thoroughly confused and am seeking guidance on what is best way to look at stability over time in macs.
Kind regards,
Andrea Burgess.
I have a longitudinal study where participants were seen between 1 and 6 times at set appointment times of 18, 24, 30, 36, 48, 60 months (age as continous variable is also available). I am interested to see if there is change over time in the ordinal variable macs (1to5). macs is not normal distribution. How is the best way to look at this ?
----------------------- copy starting from the next line -----------------------
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input int patientid byte appt_type float age byte macs 1386 24 27.02 1 1386 30 32.09 1 1386 36 37.38 2 1386 48 48.46 1 1386 60 63.39 1 1394 24 23.41 2 1394 30 29.65 2 1394 36 35.41 2 1394 48 47.61 2 1394 60 60.2 1 1396 24 22.09 2 1396 30 29 2 1396 36 36.03 2 1396 48 47.38 1 1396 60 63.06 1 1417 30 18.20 4 1417 36 36.79 4 1417 48 48.3 3 1417 60 61.71 2 1427 18 19.79 5 end label values appt_type appt_type_labels label def appt_type_labels 18 "18 months", modify label def appt_type_labels 24 "24 months", modify label def appt_type_labels 30 "30 months", modify label def appt_type_labels 36 "36 months", modify label def appt_type_labels 48 "48 months", modify label def appt_type_labels 60 "60 months", modify label values macs macs_labels label def macs_labels 1 "MACS 1", modify label def macs_labels 2 "MACS 2", modify
From my first research, I looked at change over time using long format and used
Code:
mean macs, over(appt_type) lincom _subpop_1 - _subpop_2, or lincom _subpop_2 - _subpop_3, or lincom _subpop_3 - _subpop_4, or lincom _subpop_4 - _subpop_5, or lincom _subpop_5 - _subpop_6, or lincom _subpop_1 - _subpop_6, or lincom _subpop_1 - _subpop_3, or lincom _subpop_1 - _subpop_3, or
this showed significant difference in mean macs between 18 months and 24 months but not between other groups
I also looked at it in wide format and used
Code:
gen macsdiff2= macs24 - macs18 gen macsdiff3 = macs30 - macs24 gen macsdiff4 = macs36 - macs30 gen macsdiff5 = macs48 - macs36 gen macsdiff6 = macs 60- macs48 ttest macsdiff2=0 ttest macsdiff3=0 ttest macsdiff4=0 ttest macsdiff5=0 ttest macsdiff6=0
This was the result which I was expecting.
However, it was pointed out to me that macs was not normally distributed, and ordinal (5 level).
Then I was not sure if this is correct (even though it made sense), and so have used
Kappa statistic with the result that there is significant agreement between macs at all ages (including macs18 and macs24)
Code:
kap macs18 macs24
Agreement Agreement Kappa Std. Err. Z Prob>Z
-----------------------------------------------------------------
63.33% 22.06% 0.5296 0.0661 8.01 0.0000
Code:
kap macs24 macs30
Agreement Agreement Kappa Std. Err. Z Prob>Z
-----------------------------------------------------------------
78.76% 26.91% 0.7094 0.0530 13.39 0.0000
kap macs18 macs24, wgt(w)
Ratings weighted by:
1.0000 0.7500 0.5000 0.2500 0.0000
0.7500 1.0000 0.7500 0.5000 0.2500
0.5000 0.7500 1.0000 0.7500 0.5000
0.2500 0.5000 0.7500 1.0000 0.7500
0.0000 0.2500 0.5000 0.7500 1.0000
Expected Agreement Agreement Kappa Std. Err. Z Prob>Z
-----------------------------------------------------------------
90.42% 62.43% 0.7449 0.0872 8.54 0.0000
I also used Friedman test to look at the difference….
Code:
friedman macs18 macs24
Kendall = 0.8955
P-value = 0.0002
Code:
friedman macs24 macs30
Kendall = 0.8634
P-value = 0.0000
Code:
friedman macs18 macs24 macs30
Kendall = 0.8616
P-value = 0.0000
Code:
friedman macs18 macs24 macs30 macs48 macs60
Kendall = 0.8334
P-value = 0.0000
So, now I am thoroughly confused and am seeking guidance on what is best way to look at stability over time in macs.
Kind regards,
Andrea Burgess.