Dear Stata Users,
I am trying to import dataset below into stata from csv Array but some variable names are too long and and are separated by '/' so they come out in the format v23, v24 v25, etc. Kindly I seek guidance on how I can write a loop statement in stata to import this dataset into stata without renaming the variables in the format v23, v24 and etc. I I would prefer to start ready from right and stops where the 1st '/' and pick that as the variable name. I believe this is possible but through loops. Kindly I would appreciate any guidance on how to fix this. see attached data format for guidance.
Thank you.
Collins
Related Posts with importing dataset with long variables names into stata through loop statements
xtivreg2 and interpretation of post estimation resultsHi, I am running an xtivewg2 command using some instrumental variables. I would like to reconfirm m…
My nl equation has an error, please help!Hello everyone, I am trying to estimate the parameters a and c of a nonlinear equation. The nonline…
Problem with calculating particular percentages of flowsGood morning, first of all these are the first times I am using Stata, so this could be a very eleme…
Loop over quarterly variables to find yearly meansHi Everyone, I'm quite new to Stata (version 17.0) and I'm having some trouble implementing a loop …
Create a chart to track changes of exectuive titlesHi Statalist, I want to create a chart to record the title changes of exectuives. For example, I w…
Subscribe to:
Post Comments (Atom)
0 Response to importing dataset with long variables names into stata through loop statements
Post a Comment