Hi,
I have 3 variables (var1 var2 var3) each with 5 categories (1, 2, 3, 4 & 5).
I would like to create a variable, var4, showing overall total counts of the observations in 1's, 2's, 3's, 4's and 5's combined.
so that command tab var4 will give 1 (being sum of, 1 of var1 + 1 of var2 + 1 of var3) and 2 (being sum of, 2 of var1 + 2 of var2 + 2 of var3)...
and at the end, the overall mean and standard deviation of var4.
Thank you in advance,
Immac
Related Posts with total
How to construct loops doing something by group, with a Mata function inside the loop instead of a command?Good evening, Can somebody please show me how to calculate stuff by groups, when I am calling a Mat…
Yearly Sale Changes (in percentage)hello statalist, I hope everyone is fine I've following panel data of customers. I wanna know how …
The F or chi2 model statistic has been reported as missingHi, I have a panel data for US listed firms for the years 2001-2019. I am trying to a model to dete…
Specify overall column and heterogenity statistic on forest plot in Stata 17Hello! I'm working in Stata 17 with the following meta set, declared as follows: meta set logrr lo…
Explanation of tabstat commandHello, I am a little confused when running the "tabstat" command. For example, I entered the comman…
Subscribe to:
Post Comments (Atom)
0 Response to total
Post a Comment