Hello everyone!
I have a panel model - 14 individuals over a time period of 31 years.
I need to perform some simple descriptive statistics: in particular, I need to observe the mean for each variable, specific to each individual (e.g. mean of variable A for individual 1, 2, 3 and so on).
By typing the following command
sum if id == 1
I obtain the following output:
------------------------------------------------------------------------------------------------------------------------
Variable | Obs Mean Std. Dev. Min Max
-------------+---------------------------------------------------------
Tab | 0
id | 31 1 0 1 1
t | 31 16 9.092121 1 31
A | 31 205.4194 149.3472 2 432
B | 31 300.4194 99.29444 126 412
---------------+---------------------------------------------------------
C | 31 139 15.79029 114 165
D | 31 257.4839 18.91185 216 282
E | 31 150.7742 125.7905 7 389
F | 31 111.8387 78.85011 8 236
G | 31 180.4516 146.6683 3 403
---------------+---------------------------------------------------------
H | 31 37.80645 25.08442 4 73
I | 31 33.32258 22.42972 3 78
--------------------------------------------------------------------------------------------------------------------------
The same result is obtained also running the command
bysort id: egen mean_A = mean(A)
However, these results are not the actual mean.
I can determin it by simply observing values in browse table, where, for instance, the mean value of variable B for individual 1 is around 5000.
Is there a different way in order to get accurate results about variable means, specified for single individual?
Thank you in advance!
I have a panel model - 14 individuals over a time period of 31 years.
I need to perform some simple descriptive statistics: in particular, I need to observe the mean for each variable, specific to each individual (e.g. mean of variable A for individual 1, 2, 3 and so on).
By typing the following command
sum if id == 1
I obtain the following output:
------------------------------------------------------------------------------------------------------------------------
Variable | Obs Mean Std. Dev. Min Max
-------------+---------------------------------------------------------
Tab | 0
id | 31 1 0 1 1
t | 31 16 9.092121 1 31
A | 31 205.4194 149.3472 2 432
B | 31 300.4194 99.29444 126 412
---------------+---------------------------------------------------------
C | 31 139 15.79029 114 165
D | 31 257.4839 18.91185 216 282
E | 31 150.7742 125.7905 7 389
F | 31 111.8387 78.85011 8 236
G | 31 180.4516 146.6683 3 403
---------------+---------------------------------------------------------
H | 31 37.80645 25.08442 4 73
I | 31 33.32258 22.42972 3 78
--------------------------------------------------------------------------------------------------------------------------
The same result is obtained also running the command
bysort id: egen mean_A = mean(A)
However, these results are not the actual mean.
I can determin it by simply observing values in browse table, where, for instance, the mean value of variable B for individual 1 is around 5000.
Is there a different way in order to get accurate results about variable means, specified for single individual?
Thank you in advance!
Comment