I have the data as below. Each subject has multiple rows of entries and only the first row of a particular subject has the information. Is there a STATA command that I can use to fill the same info of a particular subject in all rows (with same ID).
clear
input byte(ID Age) str1 Gender long INCOME
1 34 "F" 10000
1 . "" .
1 . "" .
2 65 "M" 25000
2 . "" .
3 24 "F" 8000
3 . "" .
3 . "" .
3 . "" .
3 . "" .
3 . "" .
3 . "" .
4 69 "M" 190000
5 17 "F" 45000
5 . "" .
6 79 "M" 56786
6 . "" .
6 . "" .
6 . "" .
6 . "" .
7 10 "M" 140000
7 . "" .
7 . "" .
7 . "" .
8 49 "F" 240000
8 . "" .
8 . "" .
9 56 "F" 230000
9 . "" .
9 . "" .
10 90 "F" 600
10 . "" .
10 . "" .
end
I will really appreciate if someone can help me. My actual data has very large
clear
input byte(ID Age) str1 Gender long INCOME
1 34 "F" 10000
1 . "" .
1 . "" .
2 65 "M" 25000
2 . "" .
3 24 "F" 8000
3 . "" .
3 . "" .
3 . "" .
3 . "" .
3 . "" .
3 . "" .
4 69 "M" 190000
5 17 "F" 45000
5 . "" .
6 79 "M" 56786
6 . "" .
6 . "" .
6 . "" .
6 . "" .
7 10 "M" 140000
7 . "" .
7 . "" .
7 . "" .
8 49 "F" 240000
8 . "" .
8 . "" .
9 56 "F" 230000
9 . "" .
9 . "" .
10 90 "F" 600
10 . "" .
10 . "" .
end
I will really appreciate if someone can help me. My actual data has very large
Comment