Hello all,
I just reshaped data from long to wide and now have four sets of about 15 variables with the different notations I used in reshaping as part of the variable name and label. I was able to rename the variables in batches, but haven't been able to find a simple way to relabel just the prefix of the variable label.
For example, one variable is labeled "111 countycode", another is "111 testyear". I used 111 to represent 11th Grade ELA testing when reshaping. I'd like to replace all of the 111's with "11th ELA" and leave the suffixes (e.g., countycode, testyear) as they are. I've played around with a few loops but haven't been able to figure out how to do this correctly.
I appreciate any help you can offer!
Related Posts with Replacing Prefix of Variable Labels
IV-Regression with ivreg2- Does not save first stageHello there, I am instrumenting my governance variable with politics variables. However my code doe…
Proportion VariableHello Statalisters, I have a dataset where I am trying to calculate the proportion variable represe…
Dropping Variables Based on Condition and in a LoopHello I need help learning how to drop a variable if one or more observations are greater than a num…
Weighted correlationHey guys, I am currently writing my thesis and currently struggle with the implementation of my mod…
Loop missingness at randomHi everyone, I'm trying to check whether my missing values are missing at random. I have 24 variabl…
Subscribe to:
Post Comments (Atom)
0 Response to Replacing Prefix of Variable Labels
Post a Comment