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
Help creating a graph, and add confidence intervals to another graphHi, Question 1: I have a dataset with patent count, a dummy to check wheter a firm engages in a M&a…
How to detect data entry error: locating an observation that does not match any of the observations of a given set?Hi Statalist, Apologies for the vagueness of the question as I didn't know how to frame it better. H…
Standard deviation of annual changes in log-sales over the recent five yearsHi, I would like to calculate the standard deviation of annual changes in log-sales over the recent…
find robustHow can I solve the following error? must specify panelvar; use xtset r(459); …
Estimating discrete choice model using continuous v/s binary variablesHello, I am trying to estimate a discrete choice model, and I have a quick question on how I can st…
Subscribe to:
Post Comments (Atom)
0 Response to Automatic average calculation
Post a Comment