This macro creates an age group variable consisting of custom, user-specified groupings, with allowance for any mix of time units. More...
This macro creates an age group variable consisting of custom, user-specified groupings, with allowance for any mix of time units.
Usage
%ms_agestrat(INFILE=_POV1,
OUTFILE=_POV1,
STARTDT=birth_date,
ENDDT=ADate,
TIMESTRAT=&agestrat.,
DROPVARS=minagedt maxagedt);
| [in] | INFILE | Input file containing start date (required). |
| [out] | OUTFILE | Output file containing the age group for each observation. |
| [in] | STARTDT | Start date to measure age. |
| [in] | ENDDT | End date to measure age. Can be a variable or a constant date. |
| [in] | TIMESTRAT | Age groups for stratification. |
| [in] | DROPVARS | List of variables to drop on &OUTFILE. |
None.