Hi ,
I have a huge dataset with 12000 observations with sample ID running in sequence (1-12000). I am interested to calculate mean of (Cholesterol) for every 100 observations. How do I write a code for that?
Is it:
egen avechol = mean(Cholesterol), by ()
I don't know what to write in the by() syntax?
Please help!
Many thanks.
Related Posts with Calculating Mean by every 100 observations?
Panel Data: Table with ranks of medians over groupsHi together, i use stata 16.0 and have a panel dataset with monthly average temperature (tavg) from…
different results using stata14 and stata15Hi all I'm running a pool OLS regression with the command as follows. xi: reg lnnumber_d_w post soe …
Dynamic ML model code syntax error for simulation of maximum likelihoodHello, could someone help me identify what is the problem with this code I tweaked to simulate maxim…
Am I using the correct code for running the models separately for each industry?Hi all, I have an unbalanced panel data, 11 industries and 21 years. After doing the main regressi…
Calculation of RCA (Revealed Comparative Advantage)Dear Statalist, I am trying to calculate RCA(Revealed Comparative Advantage) to use in my thesis. I…
Subscribe to:
Post Comments (Atom)
0 Response to Calculating Mean by every 100 observations?
Post a Comment