Dear all,
I am using Stata 16, on mac. I have taken a snapshot on the panel dataset I am working with.
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
I am using Stata 16, on mac. I have taken a snapshot on the panel dataset I am working with.
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
Comment