Hey there I have another question. Here as example for the Grunfeld database: I need a code that calculates the mean of the invest variable for every company with the same number and then automatically continues with the next company number (even if it is not 1,2,3 .. but if there are the following numbers missing like 1,5,9, etc.). In fact that I do not have to enter this code again for all 200 observations, but this is done automatically. After calculating the means I want to divide the calculated means of invest values into quintiles, but so that each company (with same number) always stays in the same quintile based on the mean of invest and cannot jump between the quintiles.
Thanks for your help.
0 Response to Automatic average calculation
Post a Comment