ddediu / AdhereR

Computation of adherence to medications from Electronic Healthcare Data in R
25 stars 6 forks source link

Plotting with FW starting late with align.all.patients=TRUE does not align the events as they should #181

Closed ddediu closed 2 years ago

ddediu commented 2 years ago
x = CMA7(med.events[med.events$PATIENT_ID %in% c(1,2,3),],
         CMA.to.apply="CMA7",
         ID.colname="PATIENT_ID",
         event.date.colname="DATE",
         event.duration.colname="DURATION",
         event.daily.dose.colname="PERDAY",
         medication.class.colname="CATEGORY",
         followup.window.start=230,
         followup.window.duration=705,
         observation.window.start=41,
         observation.window.duration=100,
         date.format="%m/%d/%Y");
plot(x, align.all.patients=TRUE);
ddediu commented 2 years ago

Indeed, it was somehow a mess that everybody missed for quite a while :( Now it should work fine for all CMAs, align.all.patientsand align.first.event.at.zero values