calculate_pdc

0th

Percentile

Calculate Proportion Days Covered

Calculate the proportion of days covered (PDC) from a pharmaceutical claims database. This function is suggested only after one has properly adjusted their dates (propagate_date()) and identified gaps in therapy (identify_gaps()). This function calculates a length of total therapy as the first fill date to the last for a given grouping. Finally, if you'd like to view adherence by episodes after you have used rank_episodes(), the function will re-adjust gaps for you so that the gap that defined the episode isn't included.

Usage
calculate_pdc(.data, .summarise = TRUE)
Arguments
.data

data frame

.summarise

Logical value (defaulting to TRUE) indicating whether the output should be summarised or not

Value

a summarised tibble, by default, with proportion of days covered calculated

Aliases
  • calculate_pdc
Examples
# NOT RUN {
library(adheRenceRX)
library(dplyr)

toy_claims %>% 
  group_by(ID) %>% 
  propagate_date(.date = date, .days_supply = days_supply) %>% 
  identify_gaps() %>% 
  calculate_pdc()
  
#OR, one could group by the ID and episode of care like...
toy_claims %>% 
  group_by(ID) %>% 
  propagate_date(.date = date, .days_supply = days_supply) %>% 
  identify_gaps() %>% 
  rank_episodes(.permissible_gap = 30) %>% 
  ungroup() %>% 
  group_by(ID, episode) %>% 
  calculate_pdc()
# }
Documentation reproduced from package adheRenceRX, version 1.0.0, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.