Bring value labels to variable labels when reshaping wide
问题 In Stata, I would like to be able to bring value labels up into variable labels when reshaping wide. My raw data looks like this: patient hosp_id hosp_name charges Andrew 1 Springfield General $10 Barry 1 Springfield General $20 Crista 2 Lincoln Medical Center $10 Doris 2 Lincoln Medical Center $15 Ellen 1 Springfield General $15 Faye 3 Memorial Hospital $35 I then label the values of hosp_id and reshape wide . label define hosp_names 1 "Springfield General" 2 "Lincoln Medical Center" 3