Quantcast
Channel: Statalist
Viewing all articles
Browse latest Browse all 72776

Order variables, vaules with household id

$
0
0
Dear Statlist,

I am building household data but I have problems with ordering of values across each household id for example:

data look like this now:
Code:
 
hid code/food food/Qkg food/Ex
1 apple 3 6,9
3 apple 0,5 1,15
8 apple 1,7 3,91
9 apple 2 4,6
12 apple 4,5 10,35
14 apple 3,2 7,36
15 apple 2 4,6
16 apple 0,8 1,84
18 apple 3 6,9
but I want to make order in this way:
Code:
 
hid food/Qkg food/Ex
1 apple 3 6,9
2
3 apple 0,5 1,15
4
5
6
7
8 apple 1,7 3,91
9 apple 2 4,6
10
11
12 apple 4,5 10,35
13
14 apple 3,2 7,36
15 apple 2 4,6
16 apple 0,8 1,84
17
18 apple 3 6,9
Is there exist any commands in stata to order in this way

Thank you

Viewing all articles
Browse latest Browse all 72776

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>