pharmaverse / blog

Blogging on the latest, greatest and most spectacular stuff happening around the pharmaverse
https://pharmaverse.github.io/blog/
Apache License 2.0
23 stars 10 forks source link

Identify List of 5-10 potential blogs posts #2

Closed kaz462 closed 1 year ago

kaz462 commented 1 year ago
kaz462 commented 1 year ago

A value level validation use case, where admiral is used to validate a small chunk of the data:

# read in data
path_ads <- "xxxx"
adex <- haven::read_sas(paste0(path_ads, "adex.sas7bdat")) %>% 
  select(USUBJID, PARAM, PARAMCD, AVAL)

# subset input data to PARAMCD = "TOTDOSE", "NUMCYC"
adex_TOTDOSE_NUMCYC <- adex %>% filter(PARAMCD %in% c("TOTDOSE", "NUMCYC"))
# admiral::derive_param_computed()
val <- 
  derive_param_computed(
  adex_TOTDOSE_NUMCYC,
  by_vars = exprs(USUBJID),
  parameters = c("TOTDOSE", "NUMCYC"),
  analysis_value = AVAL.TOTDOSE / AVAL.NUMCYC,
  set_values_to = exprs(
    PARAMCD = "ADPCYMG",
    PARAM = "Actual Dose per Cycle (mg)"
  )
) 

# compare with primary
diffdf::diffdf(adex %>% filter(PARAMCD == "ADPCYMG"), 
               val %>% filter(PARAMCD == "ADPCYMG"), 
               keys = c("USUBJID", "PARAMCD"))
bms63 commented 1 year ago

Love this already - we got a our first post! I was thinking that maybe we should to 4 posts to fill out the site and keep it form looking sad - then switch to 1 every two weeks. @pharmaverse/commswg