I have data that are in long format where one ID has four rows of data. Only one row has information and I want to fill in the other three rows with the same information. Here is a snapshot of my data and the code that I attempted. Any advice would be great - thanks.

Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input double(id time in)
1002 0                  .
1002 1                  .
1002 2 1.5033675432969853
1002 3                  .
1003 0                  .
1003 1                  .
1003 2   .632943440174186
1003 3                  .
end
by id, sort: replace in = cond(!missing(in[_n-1], in[_n-1], in[_n+1]) if missing(in)