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?
Program + ForeachHi there, I am a new user here in this forum, so this is my first thread. My question: I am trying…
Get no. of times for loop has iteratedIs there a way that I can access the number of times a given loop is on. For example, Code: sysus…
Splitting string in two numeric variablesHello! My data set includes a variable called price that is recorded as an interval (in most cases):…
Deleting rows with the same valuesDear Statalists, In my dataset i have rows with same value, more precisely "NA" therefore i want to …
Working with bootstrap, program and foreachHello, I have investigated my problem and have not been able to find a solution. I would like to ca…
Subscribe to:
Post Comments (Atom)
0 Response to Calculating Mean by every 100 observations?
Post a Comment