I have a five-datasets (longitudinal dataset) from (the labour force survey LFS in the UK) from April 2019 to June 2021. LFS has a rotating panel, so we can follow people for five conceive quarters, so each longitudinal dataset has five quarters. for example for the first dataset, April 2019 to June 2020, shown as :
The second dataset :
Third dataset :
Forth :
Last one:
My question is :
How can I append all five datasets in one long dataset with define by the time index as shown on the original datasets?
I tried to append with this command :
But I found the data has just been defined by the time index of the first dataset (April 2019 to June 2020), not including all the time of the five datasets! as this :
How can I solve this to show all the time ?
Thanks in advance
Code:
* Example generated by -dataex-. For more info, type help dataex clear input byte quarter 1 2 3 4 5 end label values quarter quarter label def quarter 1 "Apr-Jun 2019", modify label def quarter 2 "Jul-Sept 2019", modify label def quarter 3 "Oct-Dec 2019", modify label def quarter 4 "Jan-Mar 2020", modify label def quarter 5 "Apr-Jun 2020", modify
The second dataset :
Code:
* Example generated by -dataex-. For more info, type help dataex clear input byte quarter 1 2 3 4 5 end label values quarter quarter label def quarter 1 "July-Seb 2019", modify label def quarter 2 "Oct-Des 2019", modify label def quarter 3 "Jan-Mar 2020", modify label def quarter 4 "Apr-Jun 2020", modify label def quarter 5 "July-Seb 2020", modify
Third dataset :
Code:
* Example generated by -dataex-. For more info, type help dataex clear input byte quarter 1 2 3 4 5 end label values quarter quarter label def quarter 1 "Oct-Des 2019", modify label def quarter 2 "Jan-Mar 2020", modify label def quarter 3 "Apr-June 2020", modify label def quarter 4 "July-Sep 2020", modify label def quarter 5 "Oct-Des 2020", modify
Code:
* Example generated by -dataex-. For more info, type help dataex clear input byte quarter 1 2 3 4 5 end label values quarter quarter label def quarter 1 "Jan-Mar 2020", modify label def quarter 2 "Apr-June 2020", modify label def quarter 3 "July-Sep 2020", modify label def quarter 4 "Oct-Des 2020", modify label def quarter 5 "Jan-Mar 2021", modify
Code:
* Example generated by -dataex-. For more info, type help dataex clear input byte quarter 1 2 3 4 5 end label values quarter quarter label def quarter 1 "Apr-June 2020", modify label def quarter 2 "July-Sep 2020", modify label def quarter 3 "Oct-Des 2020", modify label def quarter 4 "Jan-Mar 2021", modify label def quarter 5 "Apr-June 2021", modify
My question is :
How can I append all five datasets in one long dataset with define by the time index as shown on the original datasets?
I tried to append with this command :
Code:
sysuse April2019_June2020_ready, replace append using July2019_Seb2020_ready Oct2019_Des2020_ready Jan2020_Mar2021_ready_ready April2020_June2021_ready sort PERSID quarter save ZHC_April2019_June2021, replace
Code:
* Example generated by -dataex-. For more info, type help dataex clear input byte quarter 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 end label values quarter quarter label def quarter 1 "Apr-Jun 2019", modify label def quarter 2 "Jul-Sept 2019", modify label def quarter 3 "Oct-Dec 2019", modify label def quarter 4 "Jan-Mar 2020", modify label def quarter 5 "Apr-Jun 2020", modify
How can I solve this to show all the time ?
Thanks in advance

Comment