Dear all,
I need help about the following issue:
Target: In my data there exists a variable, x. Within each group of observations identified by a unique id (call the variable boxnumber), x is missing for all but one observation. However, this value is not always in the same place or location; sometimes it is in the first raw of within the group and sometimes it is in row 3 or 4 etc. I want to assign this single nonmissing value of x (within each group) to all missing values of x within the group. That is, when I'm done, x is nonmissing for all observations and constant within boxnumber. This constantvalue of x (within id) remains unchanged for the original nonmissing values of x. Very similar question was asked in the following link. However, that solution suggested works only if this nonmissing value is always in the same order within the group. Thank you for your help. http://www.stata.com/statalist/archi.../msg00921.html http://www.stata.com/statalist/archi.../msg00923.html
I need help about the following issue:
Target: In my data there exists a variable, x. Within each group of observations identified by a unique id (call the variable boxnumber), x is missing for all but one observation. However, this value is not always in the same place or location; sometimes it is in the first raw of within the group and sometimes it is in row 3 or 4 etc. I want to assign this single nonmissing value of x (within each group) to all missing values of x within the group. That is, when I'm done, x is nonmissing for all observations and constant within boxnumber. This constantvalue of x (within id) remains unchanged for the original nonmissing values of x. Very similar question was asked in the following link. However, that solution suggested works only if this nonmissing value is always in the same order within the group. Thank you for your help. http://www.stata.com/statalist/archi.../msg00921.html http://www.stata.com/statalist/archi.../msg00923.html
Comment