Projects

SAS macro creating publication ready table output

The %output_table macro generates a comprehensive summary table that combines descriptive statistics, absolute standardized difference, and optional statistical tests.
It integrates results from up to three sub-macros -%descriptive_stats, %asd, and %pval – into a single output dataset and optionally formats it using PROC REPORT, which can be output into various formats like PDF, RTF, XLSX using ODS syntax.

ParameterDescription
in=Input dataset name.
var_list=List of variables for which statistics are generated, separated with pipe sign |.
types_list=List of variable types corresponding to var_list (1=cont, 2=cat), separated with pipe sign |.
only_mean=If 1, only means are calculated (no full descriptive output). Default = 0.
by=Grouping variable used to split data into comparison groups.
by_order=Custom order of groups in the final output.
var_cat_order=Custom order of categories for categorical variables.
compare_list=List of group comparisons, e.g., 1_2
post_hoc_list=List of post-hoc comparisons between categories to include (optional).
test_lists=List of statistical tests to apply (NOT READY YET – it applies automaticly Fisher’s/chi-squared test for categorical or Wilcoxon for continuous for now).
treated=Specifies the reference or treated group (optional).
where=WHERE condition to filter the input dataset.
weight=Weight variable for analyses (default = 1, i.e., no weighting).
asd=Flag: if 1, computes ASD between comparison groups.
pval=Flag: if 1, computes and displays p-values.
out=Name of the output dataset. If empty, defaults to output_table.
print=If 1 (default), prints formatted output via PROC REPORT.
debug=If 1, temporary datasets (temp_, asd, pval, stats) are not deleted — useful for debugging.

Source code on github: Link

Codelist Manager — R Shiny App for ICD-10 Code Group Management

Codelist Manager is an interactive R Shiny application designed to help researchers and data analysts efficiently manage and organize medical code lists (e.g., ICD-10 codes) used in clinical and Real-World Evidence (RWE) studies. The app provides an intuitive interface for creating, editing, and exporting custom groups of medical codes directly from a master codelist.

Source code on github: Link