medCR {medAdherence} | R Documentation |
medCR
function calculates the compiance rate.
Compliance Rate (CR) were computed taking the ratio of the sum of days'
supplies (excluding the last days' supply) to the elapsed intervals between
the last dispensation date and the first dispensation date.
The formula is: (Total Days' Supply - Last Days' Supply)/(Last Dispensation Date - First Dispensation Date) x 100.
medCR(df=data)
df |
a dataframe created by preData funtion |
Xiangyang Ye, Pharmacotherapy Outcomes Research Center, University of Utah
Ren XS, Kazis LE, et al. Identifying Patient and Physician Characteristics That Affect Compliance with
Antihypertensive Medications. Journal of Clinical Pharmacy and Therapeutics 2002;27:47-56
Hess, LM, Raebel, MA, et al. Measurement of Adherence in Pharmacy Administrative Databases: A Proposal for Statndard Definitions and Preferred Measures The Annals of Pharmacotherapy 2006;40:1280-1288
data(cmos) predt <- preRxData(df=cmos,id=ptid,rxDate=rxDay,daySupply=supplies) medCR(predt)