Hi everybody.
My dataset has panel data at the subnational level of regions. In my summary statistics I do not only want to include the number of observations for every variable, but also the corresponding number of regions and countries where the variables have nonmissing values.
I can display the number of regions for a variable by
distinct REGION if VARIABLE !=.
But I want to include this number into the summary statistics for this variable.
My idea was to create a summary statistics "by hand" using reshape and egen rowmean/rowmedian/etc. commands. But I don“t know how to include the number of distinct values of the variable REGION and COUNTRY for nonmissing values of the variables.
Thanks for your help!
Aiko Schmeisser
My dataset has panel data at the subnational level of regions. In my summary statistics I do not only want to include the number of observations for every variable, but also the corresponding number of regions and countries where the variables have nonmissing values.
I can display the number of regions for a variable by
distinct REGION if VARIABLE !=.
But I want to include this number into the summary statistics for this variable.
My idea was to create a summary statistics "by hand" using reshape and egen rowmean/rowmedian/etc. commands. But I don“t know how to include the number of distinct values of the variable REGION and COUNTRY for nonmissing values of the variables.
Thanks for your help!
Aiko Schmeisser
Comment