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
Error 134: too many valuesHello STATA community, i am running a gravity model with exporter_time_FE, importer_time_FE and cou…
graphical presentationHi, I have a data of average steps over 12 weeks. How to use histogram/bar graph in stata to represe…
Set baseline category of date variableI want to set the baseline category of a date variable. I thought of using fvset, see below. It does…
Ordered Regression (dependent variable)Hallo Statalist, i am trying to find out the effect of the macro variables on the credit Rating in …
Too much margin on x-axis with graph combineHi Statalists, I am combining four graphs with datetime on the x-axes. The individual graphs have a…
Subscribe to:
Post Comments (Atom)
0 Response to total
Post a Comment