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.
Related Posts with Automatic average calculation
Fixed and random effects in cross sectional dataDear all, 1. I have a cross sectional data which has information on siblings. Will i be able to do …
Transforming dataset into a panel datasetDear STATA-Users, I am working on a data set which currently looks like that: (The data is sorted a…
Using Wordscore in STATA to assess trends in press releasesI'm new to the forum, but I was told I might get some help here. I'm doing an MA in political scien…
Changing dates from "dd/mm/yyyy 00:00" to "yyyy mm"Dear all, I am working with a large dataset of nearly 3 million observations on house prices in the…
Help with event studyHello everyone, I am conducting some type of event study related to political elections in several c…
Subscribe to:
Post Comments (Atom)
0 Response to Automatic average calculation
Post a Comment