Dear All, would do you please to help me, how to perform this? 1. I have a database of around 6 variables and 100 observations. I would like to replace the first (only first) of movenumber with contain missing values in migstat. For example, from the following database, I would like to replace the each first observation for each ID with the next movenumber observation whose migstat value is missing. As a result, the movenumber sequence remains 1 to 16, but the data on other variables (year, dest, origin, migstat) shifts up to compensate for the missing in the first row
2. How to delete all of variables (ID,year,dest,origin,migstat) if it contains only 1 movenumber and migstat is missing Thankyou in advance...
| ID | movenumber | year | dest | origin | migstat |
| 1 | 1 | 1935 | 1201 | 1151 | . |
| 1 | 2 | 1936 | 1201 | 1151 | 1 |
| 1 | 3 | 1938 | 1222 | 1151 | 1 |
| 1 | 4 | 1940 | 1432 | 1151 | 1 |
| 1 | 5 | ||||
| 1 | 6 | ||||
| 1 | 7 | ||||
| 1 | 8 | ||||
| 1 | 9 | ||||
| 1 | 10 | ||||
| 1 | 11 | ||||
| 1 | 12 | ||||
| 1 | 13 | ||||
| 1 | 14 | ||||
| 1 | 15 | ||||
| 1 | 16 |

Comment