I'm not sure how to phrase this question but I want to use all the existing variable labels but add the same additional information at the end of all the variable labels from the same dataset. For example it would be something like
variable1 "Variable 1"
variable2 "Variable 2"
to
variable1 "Variable 1 residential"
variable2 "Variable 2 residential"
The farthest I have gotten is using a foreach loop to use the variable name and add the same label extension to all the variables but not the original variable labels
This is a sample of code for how far I've gotten
clear
sysuse auto.dta
foreach x of varlist _all {
local label: variable label `x'
label var `x' "`x' Residential"
}
Any help for how to get the original variable labels with the "Residential" added would be appreciated.
Related Posts with Add same extension to existing variable labels
mode choice experimentI am a new in using the Stata software and dealing with a mode choice experiment having three differ…
fractional polynomial vs multivariable fractional polynomialHello, I am a little confused between the two concepts listed in the subject line. FP in stata can …
Summing up valuesI have the following Data set naics. 1989. 1990. 1991. 1992. 111 xxxxx xxxxx xxxxx xxxxx 113 xxxxx…
Again...egenHi statlist, as Prof suggested me I am reading the even pdf command but I am still quite confused. …
Restrict analysis to second occurrence of an event (Panel data)Dear Statalisters, I intend to analyse panel data (long format) on the effects of individuals taki…
Subscribe to:
Post Comments (Atom)
0 Response to Add same extension to existing variable labels
Post a Comment