I'm a new Stata user.
So, I would like to know how can I shift columns, then add the initial column and all shifted columns without creating missing values.
For example:
| Period | X | X1 | X2 | X3 | X4 | X+X1+X2+X3+X4 |
| January 2020 | 1 | . | . | . | . | 1 |
| February 2020 | 1 | 1 | . | . | . | 2 |
| mars-20 | 1 | 1 | 1 | . | . | 3 |
| April 2020 | 1 | 1 | 1 | 1 | 4 | |
| May 2020 | 1 | 1 | 1 | 1 | 1 | 5 |
| June 2020 | . | 1 | 1 | 1 | 1 | 4 |
| July 2020 | . | . | 1 | 1 | 1 | 3 |
| August 2020 | . | . | . | 1 | 1 | 2 |
| September 2020 | . | . | . | . | 1 | 1 |
Particularly , even if the cells are empty , I can also add all columns without missing values ?
Thank you in advance.
0 Response to Data Processing
Post a Comment