****************************************************************************************************
****************************************************************************************************
* PROGRAM: figure_l1_driver.sas
* Created (mm/dd/yyyy): 07/14/2021
*--------------------------------------------------------------------------------------------------
* PURPOSE: This macro drives the creation of L1 figures
*--------------------------------------------------------------------------------------------------
* Sentinel Coordinating Center
* info@sentinelsystem.org
***************************************************************************************************;
%macro figure_l1_driver();
%put =====> MACRO CALLED: figure_l1_driver;
/**********************************************************************************************
1) F1: t1censor = Reasons for End of Observable Data by Group (1-CDF)
1) F1: t2followuptime = Kaplan-Meier Estimate of Event of Interest Not Occurring
2) F2: t2followuptime = Reasons for End of Follow-Up by Group (1-CDF)
3) F3: t2censor = Reasons for End of Observable Data by Group (1-CDF)
1) F1: Patient Entry into Study by Month
2) F2: Number of Prescription Dispensings in Patients First Episodes by Month
3) F3: Total Days Supply in Patients First Episodes by Month
4) F4: t5censor = Reasons for End of First Treatment Episode by Group
5) F5: t5censor = End of First Treatment Episode due to [Censoring Reason] by Group
1) F1 (not yet implemented)
2) F2 (not yet implemented)
3) F3 (not yet implemented)
4) F4: t6plota = Kaplan-Meier Estimate of First Switch Not Occurring
5) F5: t6plotb = Kaplan-Meier Estimate of Second Switch Not Occurring
6) F6: t6plota = Reasons for Censoring at First Switch Evaluation by Analysisgrp
7) F7: t6plotb = Reasons for Censoring at Second Switch Evaluation by Analysisgrp
8) F8: t6plota = Cumulative Incidence of First Switch
9) F9: t6plotb = Cumulative Incidence of Second Switch
/***********************************************************************************************/
%isdata(dataset=figurefile);
%if %eval(&nobs>0) %then %do;
create table _squaregroup as