Reputation: 317
I have several variables expressed differently with the following values as an example.
I want to multiply all values where the value is expressed as a ratio/proportion (e.g. unemployment_inc) by 100.
unemployment_inc lfp_gender unemployment_gender lfp_inc
.2335658 17.35 83.6 .3786077
.2335658 17.35 83.6 .3786077
.2335658 17.35 83.6 .3786077
I want the data to eventually look as follows:
unemployment_inc lfp_gender unemployment_gender lfp_inc
23.3 17.35 83.6 37.8
23.3 17.35 83.6 37.8
23.3 17.35
Upvotes: 0
Views: 138
Reputation: 3261
local vars_proportion unemployment_inc lfp_inc
foreach var of varlist `vars_proportion' {
replace `var' = `var' * 100
}
Upvotes: 4