I wanted to ask how we can create a dummy age and date of appointment for 170 people for 20 years (a total of 3300 new cases) . I have 379 people in my dataset and I wanted to know if there is an easier way to create 3300 dummy cases with age assigned as the following for each year starting from 2021 till 2040.
First 5 cases assign age as 22
>5-20 -23
21-50 - 24
51-100-25
101-120- 26
121-135-27
136-140-28
The appointment year should be filled up simultaneously as 2021 for the first 165 cases and then appointment date as 1-1-2021 for the first 165 and then 1-1-2022 for the next and so on till 2040
Please find below a sample or my data set. These are the 739 cases and now I need help to generate the remaining 3300 cases with the above condition.
copy starting from the next line ------- ---------------
Code:
* Example generated by -dataex-. For more info, type help dataex clear input int app_d float(age_app app_year) 21915 26 . 20089 27 . 22159 24 . 14610 28 . 21915 28 . 18993 27 . 14245 21 . 20820 26 . 21915 24 . 20270 29 . 20820 26 . 20089 24 . 20089 22 . 20820 25 . 20270 30 . 21915 27 . 20820 25 . 22159 29 . 21185 28 . 20089 27 . 20820 24 . 21915 24 . 20089 26 . 21366 26 . 18263 29 . 19724 28 . 20089 25 . 21550 26 . 21915 27 . 20820 26 . 20089 26 . 21550 29 . 21185 24 . 22159 26 . 20089 25 . 21915 24 . 18079 23 . 20636 27 . 20270 31 . 21550 23 . 21185 22 . 21001 26 . 21001 25 . 21001 26 . 21550 29 . 21550 25 . 20820 26 . 20636 25 . 12874 24 . 21185 24 . 19724 25 . 21915 31 . 21001 25 . 20454 27 . 17167 30 . 15706 29 . 17532 27 . 18993 27 . 20089 29 . 19724 28 . 15341 33 . 20636 26 . 16071 30 . 15706 27 . 15706 27 . 17167 27 . 17167 27 . 15706 31 . 15706 28 . 20820 24 . 20820 22 . 21550 24 . 21550 25 . 21001 26 . 21001 25 . 21001 28 . 15157 22 . 15706 26 . 20820 26 . 10227 23 . 18263 26 . 18993 25 . 15706 23 . 17898 25 . 19724 24 . 19724 25 . 18628 26 . 20820 24 . 20820 24 . 20454 23 . 20454 24 . 20089 25 . 19724 26 . 15706 31 . 18628 25 . 17167 30 . 19359 26 . 16802 26 . 21001 25 . 21550 27 . end format %tddd-Mon-YY app_d
0 Response to How to create a dummy age for 165 people for 20 years
Post a Comment