Merck / metalite.ae

An R package for standard adverse events analysis
http://merck.github.io/metalite.ae/
GNU General Public License v3.0
17 stars 4 forks source link

AE specification subgroup analysis #160

Open elong0527 opened 1 year ago

elong0527 commented 1 year ago

After looking the code in prepare_ae_specific_subgroup, I feel we need to talk about the function design @wangben718

  1. Is it possible to use extend_ae_specific_subgroup? that basically add an indicator to rerun prepare_ae_specific + extend_ae_specific + format_ae_specific in each subgroup?

    extend_ae_specific_subgroup <- function(outdata, subgroup){
     outdata$subgroup <- subgroup 
    
    outdata
    }
  2. Create an internal function called obtain_ae_specifc_subgroup. If outdata$subgroup is not null, we will rerun the code in each subgroup.

  3. Create an internal function called tlf_ae_specific_subgroup. If outdata$subgroup is not null, we will generate the TLFs using this internal function if user called tlf_ae_sepcific.

Benefit:

  1. all extended_ae_specific functions can be used
  2. can potentially extend the framework for ae_summary analysis in the future.