I run into a problem of filling the missing values with non-missing values. What's tricky here is the nonmissng values are random, so I cannot determine whether to use the first non-missing value or the last non-missing value. Example: Variable is my variable of interest ID company variable 1 A 123 1 A . 1 A 123 1 A 123 1 A . 2 B 321 2 B . 2 B . 2 B . What i want here is to fill the variable with 123 if the id=1 and variable with 321 if id=2. Any suggestion will be appreciated ! Thanks.
... View more