Hello everybody!
I would kindly like to ask you a very quick question:
I have a panel data, and for a certain variable (let's say var_1) I need to calculate the average for each ID:
the code: " by ID: egen MEAN_var_1 = mean(var_1) " provides for this, but the problem is that in the computation of the average, it takes into account also the missing observations.
Is there a way to perform the same average but without considering missing observations?
Many thanks!
Kodi
I would kindly like to ask you a very quick question:
I have a panel data, and for a certain variable (let's say var_1) I need to calculate the average for each ID:
the code: " by ID: egen MEAN_var_1 = mean(var_1) " provides for this, but the problem is that in the computation of the average, it takes into account also the missing observations.
Is there a way to perform the same average but without considering missing observations?
Many thanks!
Kodi
Comment