Hi,
I need some help please aligning two different date variables. I have the date people starting training (startgrade) and assessement (outcome) data. I have the time period the assessment covered (axstart). These do not match up.
I need to match axstart and axend (assessment start and end date) to the appropriate startgrade/ endgrade. Ie. if axstart is 2012 then match to startgrade in 2012. This way I can match the outcome to the appropriate grade. Ideally axstart needs to be wtihing +/-90 of one of the startgrades.
I hope that makes sense! I tried switching the data to wide but am still missing something.
I've attached a sample dataset, the actual dataset has >8000 outcomes and around 1500 individual trainees.
Grateful for any help,
Thanks,
Carla
------------------ copy up to and including the previous line -
I need some help please aligning two different date variables. I have the date people starting training (startgrade) and assessement (outcome) data. I have the time period the assessment covered (axstart). These do not match up.
I need to match axstart and axend (assessment start and end date) to the appropriate startgrade/ endgrade. Ie. if axstart is 2012 then match to startgrade in 2012. This way I can match the outcome to the appropriate grade. Ideally axstart needs to be wtihing +/-90 of one of the startgrades.
I hope that makes sense! I tried switching the data to wide but am still missing something.
I've attached a sample dataset, the actual dataset has >8000 outcomes and around 1500 individual trainees.
Grateful for any help,
Thanks,
Carla
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input long id float(axstart startgrade) long(outcome level) float axend byte grade float endgrade 1 19242 17806 5 12 19603 3 18176 1 19604 18177 1 12 19625 4 18540 1 19626 18541 6 13 19997 5 18904 1 . 18905 1 11 . 6 19268 1 . 19269 1 11 . 7 19633 1 . 19634 1 11 . 8 19997 end format %td axstart format %td startgrade format %td axend format %td endgrade label values outcome outcome label def outcome 1 " 1.0", modify label def outcome 5 " 5.0", modify label def outcome 6 " 6.0", modify label values level level_at_arcp1 label def level_at_arcp1 11 "ST6", modify label def level_at_arcp1 12 "ST7", modify label def level_at_arcp1 13 "ST8", modify
Comment