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?
Issues with HHI creationHi, I am new to the forum and to stata as well. I know this topic has been covered multiple times b…
Rename a function?How should I rename a function in Stata? I combine Stata and R, and to reduce confusion, I’d like t…
Testing means with missing valuesHello everyone, I have a small problem executing a one-would-think simple t-test and I hope you can…
Stata job opportunity in Cmabridge MA NBER has an opening for a "professional to work with researchers to explore, procure, & curate …
Multilevel regression and/or clustering standard errorsHello, In case of multilevel data, it is obvious to use for example - mixed -, but using - mixed - …
Subscribe to:
Post Comments (Atom)
0 Response to Calculating Mean by every 100 observations?
Post a Comment