Dear all,
I am using Stata 16, on mac. I have taken a snapshot on the panel dataset I am working with.
Array
I want to generate a new variable called RowMean, which is the arithmetic mean (the average) across all the of variables Participant Ever Smoked 1997? Participant Ever Smoked 1998? and Participant Ever Smoked 1999?. So for example in the first row under the Row Mean variable I would like to calculate the average in Stata: (1+-4+-4)/(3) = -2.3 I am unsure on how to write the Stata code for this?
Thank you in advance for your help
Jason Browen
Related Posts with Row Mean
weighted population density of the neighborhood in a locationHi everyone, I have a question about how to calculate the population density of the neighborhood in…
Random slope Frailty modelGreetings!! I need help in fitting random slope frailty model. Thanks in Advance!! …
Weird 'file not found' error while appending excel sheets in a folderHey all, I got some datasets in .xlsx format in a folder which I appended through the following: …
with "tab" but "too many values", with "bigtab", there is no "gen"Hallo , I got a problem with the command tabulate. I tried this: Code: tab exp, generate(EXPORTER)…
How to avoid comma and rounding in numeric formatHello, I have a dataset, it appears in Excel right like this stkcd trdmnt msmvttl 000001 1991-12 26…
Subscribe to:
Post Comments (Atom)
0 Response to Row Mean
Post a Comment