Hi everyone,
p1_1 p1_2 p1_3 p2_1 p2_2 p2_3 p3_1 p3_2 p3_3
1 1 1 2 2 2 3 3 3
1 1 1 2 2 2 3 3 3
1 1 1 2 2 2 3 3 3
1 1 1 2 2 2 3 3 3
1 1 1 2 2 2 3 3 3
1 1 1 2 2 2 3 3 3
1 1 1 2 2 2 3 3 3
I would like to generate a sum of the values with sequential variable names, using loops.
generate p1= p1_1 + p1_2 + p1_3
generate p2= p2_1 + p2_2 + p2_3
generate p3= p3_1 + p3_2 + p3_3
Thanks you....
Related Posts with Generate var using sequential variables names
List countries in estimated regressionHello,, I have a dataset with 98 countries. When I estimate the regression it only uses 92 countries…
Export missings to fileHello everyone, thank you in advance for any insight you can provide to solve my problem. I need to…
unequal pairing of observations in propensity score matchingHi stata-users, I have used the following code to pair data (1:1) after running psmatch2 in a 1:1 f…
Robustness Checks for Panel Data Fixed Effects modelI am using the following fixed effects model: Log(CEO Compensationi,t) = b1Firmperformancei,t-1+ b2…
Propensity score matching and regression following matchingHi I have never used this technique and have been reading about it but I am still confused. Please …
Subscribe to:
Post Comments (Atom)
0 Response to Generate var using sequential variables names
Post a Comment