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
Change every observations for an ID conditioning on only 1 year criteriaHello, I am currently trying to transform a panel data into a cross-section. I have something like …
Next Birth After AbortionHi All, I am using the women file from the Demographic and Health Survey (NFHS-4) India. In that fi…
Stripplot; using different symbols when using ,over(group)Dear Listers I have been working with stripplot (SCC) all day, and like how it has turned out. For …
multiple plots after marginsHi, I created, separately, two of the attached plots. In each plot, this is generated from the marg…
Multi nominal regression using maximum likelihoodHi everyone, I've checked the forum and I can't seem to find an answer to my question. Due to the …
Subscribe to:
Post Comments (Atom)
0 Response to importing dataset with long variables names into stata through loop statements
Post a Comment