Hello
I urgently need help with the loop function in STATA to order multiple variables together.
In my dataset, I have gender, region, race, database (+200 other variables) and their encoded counterparts at the bottom namely gender01, region01, race01, database01.
I want to put all numeric variables after their string counterparts like the following:
gender, gender01, region, region01, race, race01 and so on.
I know how to do 1 by 1 but it should be possible to do them all together.
Any help will be highly appreciated.
Thank you.
Related Posts with Loop function to order multiple variables together
Adding baseline variables to a linear mixed modelHello everyone, I am really new to Stata, so my apologies if it's a simple question or if I misunde…
Editing a spatial weighting matrix in neighbor list formI used spmat to create a spatial weighting matrix. I exported it in neighbor list form. The first ro…
getting multiple variables information in one variable after importing txt fileAfter importing delimited using abcd.txt data this is the following output I'm getting on my data ed…
Run Seemingly unrelated regression (SUREG) with one of the explanatory variable being latentHi All I have difficulty running an SUREG translog cost function where one of my independent variabl…
How to Correct Data Errors in Longitudinal Format Data in Stata?I have a long format dataset with data error on the variables of kg5, k68, and k912 like this, clear…
Subscribe to:
Post Comments (Atom)
0 Response to Loop function to order multiple variables together
Post a Comment