Hello,
I need some help with creating a table. My data has multiple records of the same patients and when I create a table, it put all the multiple entries. I want to put one recordid only one time in the table.
There are a total of 40 observations, but unique recordid 11. I use the following command to create a demographic table, but it includes all the observations. Is there a way I can only include unique recordid one time only in the table?
table1, vars(age contn \ gender cat\ serial contn\ base_salary contn\ advance_salary contn\)
clear
input float(recordid age) str1 gender float(serial base_salary advance_salary)
1 45 "f" 1 7400 100
1 45 "f" 2 7400 200
1 45 "f" 3 7400 300
2 27 "f" 4 7400 400
2 27 "f" 5 7400 500
3 76 "m" 6 7400 600
4 19 "f" 7 7400 700
4 19 "f" 8 7400 800
4 19 "f" 9 7400 900
4 19 "f" 10 7400 1000
4 19 "f" 11 7400 1100
4 19 "f" 12 7400 1200
4 19 "f" 13 7400 1300
5 46 "m" 14 7400 1400
5 46 "m" 15 7400 1500
5 46 "m" 16 7400 1600
5 46 "m" 17 7400 1700
5 46 "m" 18 7400 1800
5 46 "m" 19 7400 1900
5 46 "m" 20 7400 2000
5 46 "m" 21 7400 2100
5 46 "m" 22 7400 2200
5 46 "m" 23 7400 2300
6 63 "f" 24 7400 2400
6 63 "f" 25 7400 2500
7 70 "f" 26 7400 2600
8 57 "m" 27 7400 2700
8 57 "m" 28 7400 2800
8 57 "m" 29 7400 2900
9 55 "f" 30 7400 3000
9 55 "f" 31 7400 3100
9 55 "f" 32 7400 3200
9 55 "f" 33 7400 3300
9 55 "f" 34 7400 3400
10 36 "f" 35 7400 3500
10 36 "f" 36 7400 3600
10 36 "f" 37 7400 3700
10 36 "f" 38 7400 3800
11 24 "m" 39 7400 3900
11 24 "m" 40 7400 4000
12 16 "f" 41 7400 4100
12 16 "f" 42 7400 4200
12 16 "f" 43 7400 4300
12 16 "f" 44 7400 4400
12 16 "f" 45 7400 4500
12 16 "f" 46 7400 4600
13 61 "m" 47 7400 4700
13 61 "m" 48 7400 4800
13 61 "m" 49 7400 4900
13 61 "m" 50 7400 5000
13 61 "m" 51 7400 5100
14 28 "f" 52 7400 5200
14 28 "f" 53 7400 5300
14 28 "f" 54 7400 5400
14 28 "f" 55 7400 5500
15 12 "m" 56 7400 5600
16 35 "f" 57 7400 5700
16 35 "f" 58 7400 5800
16 35 "f" 59 7400 5900
16 35 "f" 60 7400 6000
17 28 "m" 61 7400 6100
17 28 "m" 62 7400 6200
18 89 "f" 63 7400 6300
18 89 "f" 64 7400 6400
18 89 "f" 65 7400 6500
18 89 "f" 66 7400 6600
18 89 "f" 67 7400 6700
19 21 "m" 68 7400 6800
19 21 "m" 69 7400 6900
20 49 "f" 70 7400 7000
20 49 "f" 71 7400 7100
20 49 "f" 72 7400 7200
20 49 "f" 73 7400 7300
20 49 "f" 74 7400 7400
end
I need some help with creating a table. My data has multiple records of the same patients and when I create a table, it put all the multiple entries. I want to put one recordid only one time in the table.
There are a total of 40 observations, but unique recordid 11. I use the following command to create a demographic table, but it includes all the observations. Is there a way I can only include unique recordid one time only in the table?
table1, vars(age contn \ gender cat\ serial contn\ base_salary contn\ advance_salary contn\)
clear
input float(recordid age) str1 gender float(serial base_salary advance_salary)
1 45 "f" 1 7400 100
1 45 "f" 2 7400 200
1 45 "f" 3 7400 300
2 27 "f" 4 7400 400
2 27 "f" 5 7400 500
3 76 "m" 6 7400 600
4 19 "f" 7 7400 700
4 19 "f" 8 7400 800
4 19 "f" 9 7400 900
4 19 "f" 10 7400 1000
4 19 "f" 11 7400 1100
4 19 "f" 12 7400 1200
4 19 "f" 13 7400 1300
5 46 "m" 14 7400 1400
5 46 "m" 15 7400 1500
5 46 "m" 16 7400 1600
5 46 "m" 17 7400 1700
5 46 "m" 18 7400 1800
5 46 "m" 19 7400 1900
5 46 "m" 20 7400 2000
5 46 "m" 21 7400 2100
5 46 "m" 22 7400 2200
5 46 "m" 23 7400 2300
6 63 "f" 24 7400 2400
6 63 "f" 25 7400 2500
7 70 "f" 26 7400 2600
8 57 "m" 27 7400 2700
8 57 "m" 28 7400 2800
8 57 "m" 29 7400 2900
9 55 "f" 30 7400 3000
9 55 "f" 31 7400 3100
9 55 "f" 32 7400 3200
9 55 "f" 33 7400 3300
9 55 "f" 34 7400 3400
10 36 "f" 35 7400 3500
10 36 "f" 36 7400 3600
10 36 "f" 37 7400 3700
10 36 "f" 38 7400 3800
11 24 "m" 39 7400 3900
11 24 "m" 40 7400 4000
12 16 "f" 41 7400 4100
12 16 "f" 42 7400 4200
12 16 "f" 43 7400 4300
12 16 "f" 44 7400 4400
12 16 "f" 45 7400 4500
12 16 "f" 46 7400 4600
13 61 "m" 47 7400 4700
13 61 "m" 48 7400 4800
13 61 "m" 49 7400 4900
13 61 "m" 50 7400 5000
13 61 "m" 51 7400 5100
14 28 "f" 52 7400 5200
14 28 "f" 53 7400 5300
14 28 "f" 54 7400 5400
14 28 "f" 55 7400 5500
15 12 "m" 56 7400 5600
16 35 "f" 57 7400 5700
16 35 "f" 58 7400 5800
16 35 "f" 59 7400 5900
16 35 "f" 60 7400 6000
17 28 "m" 61 7400 6100
17 28 "m" 62 7400 6200
18 89 "f" 63 7400 6300
18 89 "f" 64 7400 6400
18 89 "f" 65 7400 6500
18 89 "f" 66 7400 6600
18 89 "f" 67 7400 6700
19 21 "m" 68 7400 6800
19 21 "m" 69 7400 6900
20 49 "f" 70 7400 7000
20 49 "f" 71 7400 7100
20 49 "f" 72 7400 7200
20 49 "f" 73 7400 7300
20 49 "f" 74 7400 7400
end
Comment