Hi,
I have a variable called VoterTurnout2013 which does not change by time within IDs in my panel dataset. I want to calculate mean and percentiles for this variable for the whole dataset. However, I have problem if I do the ordinary calculations since I have an unbalanced panel and number of observations differ for each ID. Thus, IDs with higher (or lower) observations distort the mean and percentiles.
How can I calculate the mean and percentiles in this situation? Another thing I would like to ask: How does STATA takes into account N/A cells while calculating means (are they dropped or regarded as "0")?
Thanks for your help, example of my dataset is depicted below.
I have a variable called VoterTurnout2013 which does not change by time within IDs in my panel dataset. I want to calculate mean and percentiles for this variable for the whole dataset. However, I have problem if I do the ordinary calculations since I have an unbalanced panel and number of observations differ for each ID. Thus, IDs with higher (or lower) observations distort the mean and percentiles.
How can I calculate the mean and percentiles in this situation? Another thing I would like to ask: How does STATA takes into account N/A cells while calculating means (are they dropped or regarded as "0")?
Thanks for your help, example of my dataset is depicted below.
City (ID) | Time | VoterTurnout2013 |
1 | 2013 | 88% |
1 | 2014 | 88% |
1 | 2015 | 88% |
2 | 2013 | 72% |
2 | 2014 | 72% |
3 | 2013 | 79% |
3 | 2014 | 79% |
4 | 2013 | 91% |
Comment