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
Exploratory Factor AnalysisHi, I'm using exploratory factor analysis on a 5 point Likert Scale. The problem I'm facing is that…
Panel Data, impulse response functionsDear all, This is my first post on Stata list and I am a new Stata user. I have an unbalanced panel…
Making marginsplots equal size with graph combineHi Statalist, I'm struggling with a graphing issue perhaps someone can help me with. I'm trying to …
Issue with modifying certain values of a continuous variableHello, This is my first post - so my apologies in advance if it violates conventions or is unclear.…
xtgee how to create a linear graph with confidence interval for the adjusted modelI am running xtgee to assess the association between change in heart dimension (pch_rveda) and time …
Subscribe to:
Post Comments (Atom)
0 Response to importing dataset with long variables names into stata through loop statements
Post a Comment