AdhereR icon indicating copy to clipboard operation
AdhereR copied to clipboard

Plot ploypharmacy

Open ddediu opened this issue 5 years ago • 2 comments

Time series:

  • one ts per medication class

General:

  • define medication classes as a list of vectors of medication names
  • define the format of the Polypharmacy object + interface needed by siding windows

ddediu avatar Feb 28 '19 11:02 ddediu

Now, groups of medications can be defined as a list (possibly named) of vectors of medication class names. If the names are not given, they are automatically generated by concatenating (separated by "+") the values of the vector. Class names not explicitly included are considered to form their own class. If the group is NULL, all classes are considered to belong to a single overall group.

ddediu avatar Mar 04 '19 13:03 ddediu

For sliding windows/per episode (for each patient), the "simple" CMA function is repeatedly called for a new OW (=the current sliding window/episode) and should return an object ultimately derived from CMA0. The important members of this object are its class (to be saved in the results) and, currently, a single number accessed as the $CMA member (or, alternatively, through the getCMA() getter function).

For polypharmacy then, your object should:

  • be ultimately derived from CMA0
  • have a member $CMA (also accessible through getCMA()) that returns a single number == the global estimate for a given patient
  • have a different member (say) $CMA.individual (or $CMA.separate or $CMA.raw or whatever we agree on) that contains a data.frame with the separate estimate for each medication/interval/whatever is relevant
  • have a member that describes/contains the function used for "combining" the "raw" individual estimates (for printing, etc)

Would this work?

ddediu avatar Mar 04 '19 13:03 ddediu