Hello, I'm having issues with the following.
I have 4 variables x1, x2, x3, x4 each one with 10 observations
I need to create a variable new_variable = x1+x2+x3+x4 with help of foreach command. I know it is straightforward using gen new_variable = x1+x2+x3+x4 but I can't achieve it using foreach.
Thanks
Related Posts with Adding columns with loop
IV Probit error: "could not find initial values"Hello All! Does anyone have an idea why this error message could be popping up? Or what does it mea…
Proportional Reduction in Error and Percent Correctly Predicted after Multinomial ProbitDear Colleagues, I am using Stata 14.2 to estimate a multinomial probit model of vote choice in the…
Drop observations after the last non missing value a variableHi, I would like to drop observations after the last non missing value of the variable WC01001A by …
matsize and Pesaran estimationLadies & Gentlemen, up to 7 regressors, STATA could produce regression output successfully. When…
IV Probit error: "could not find initial values"Hello All! Does anyone have an idea why this error message could be popping up? Or what does it mea…
Subscribe to:
Post Comments (Atom)
0 Response to Adding columns with loop
Post a Comment