You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement a way allowing the definition of "types" or "classes" of medication (presumably statically defined before calling AdhereR) but that can be dynamically used (including through Shiny) to decide what to plot and use ofr estimating the CMAs.
The text was updated successfully, but these errors were encountered:
Allow medication "types"/"classes" for plotting and estimation (GitHub issue #133)
Idea: the user should be able to dynamically (i.e., on-the-fly, including in the Shiny interactive interface) include/exclude/group/order what medications are to be plotted and used for estimating CMA.
Proposal:
The user can include up to N (suggestions: N=3) columns in the data.frame containing the events, columns that define “types” (or “classes”) of medications. For example, we may have:
Where there are 2 extra columns, MED_CLASS_1 and MED_CLASS_2, that define types of medication. Please note that these can be hierarchical (i.e., all levels of MED_CLASS_2 are fully included within those of MED_CLASS_1) or not.
Then the user can tell AdhereR (through some extra parameters) that these columns exist and, more importantly, how to use them.
For this, the user can define logical combinations of the values in CATEGORY and the extra columns (here, MED_CLASS_1 and MED_CLASS_2), and numeric tests with PERDAY, DURATION and DATE, and inclusion/exclusion with PATEINT_ID. These logical combinations are defined outside the data.frame with the data and are passed to the estimation and plotting functions separately. This should allow a lot of flexibility and on-the-fly capability. The syntax follows the standard R syntax (in fact, it uses R to evaluate them in a restricted and secure environment).
There is one predefined group, "__ALL_OTHER__", containing all the medications not covered by the explicit group definitions (if any), but for this group there is no estimation of the CMA (if any) but is used only for plotting.
defined two big classes, "CLS1" and "CLS2" and estimates CMA1 only for those observations included in them (i.e., a CMA1 for observations 5, and a different CMA1 for observations 1, 3).
For plotting:
Implement a way allowing the definition of "types" or "classes" of medication (presumably statically defined before calling AdhereR) but that can be dynamically used (including through Shiny) to decide what to plot and use ofr estimating the CMAs.
The text was updated successfully, but these errors were encountered: