I am working on some clinical data looking at echocardiographic features of patients after surgery. The patients have varying numbers of postop echos at varying time intervals. I want to compare a variable over time in two groups. For example sequential measures of a gradient across a heart valve over time
I can regress a line in the data, but I want to compare the rate of change in the two groups over time.
Is this a longitudinal data question?
reshape long grad time, i(id replacement) j(str)
drop if time==.
twoway (scatter grad time if replacement==0, mcolor(blue) msize(tiny)) (scatter grad time if replacement==1, mcolor(red) msize(tiny)) ///
(lfit grad time if replacement==0, lcolor(blue)) (lfit grad time if replacement==1, lcolor(red)), ytitle(Gradient (mmHg)) ///
ytitle(, orientation(vertical)) xtitle(Time (years)) xlabel(#14) legend(order(1 "Repair" 2 "Replacement"))
0 Response to ?Longitudinal analysis
Post a Comment