thomas-rasmussen / sas_macros

SAS macros
Creative Commons Zero v1.0 Universal
5 stars 4 forks source link

(standardized) incidence rates macro #34

Closed thomas-rasmussen closed 3 years ago

thomas-rasmussen commented 3 years ago

Consider if it is meaningful to make a macro that calculates (standardized) incidence rates. Would it be possible to only have one input dataset with information on everything, and weights, risk-time and events all being calculated from this input, based on values of other parameters? Maybe wth the option that eg outcomes data and weight can can be specified separately?

example function call:

incidence_rates( in_ds = in_dat, out_ds =out_dat , / How would this work? time-variant variables selected from list and given as? character values, constant variables given as variable names in data?/ standardize_by = "age" male, / How do we specify eg year used to calculate weights? / ref_values = %str(year = 2000), / Events specified by reference of 0/1 variables in input data? / event = death aki )

It not going to be that intuitive, since it's complicated. But might be quite useful, at least for myself?

thomas-rasmussen commented 3 years ago

Probably not worth it in any way. Developing a solution in R would be preferable anyway.