I have 9 variables (road_access, market_access, storage_access, insurance_access, input_access, output_access, support_access, processing_access, credit_access) with binary responses coded as yes = 1 no =2.
I wanted to replace all he values of no to 0 for all variables at once.
I tried:
local infra_access *_access
replace infra_access= 0 if infra_access ==2
or
recode infra_access (2=0)
In both cases, it says "you specified too many variables".
Can anyone help me with the appropriate codes.
I wanted to replace all he values of no to 0 for all variables at once.
I tried:
local infra_access *_access
replace infra_access= 0 if infra_access ==2
or
recode infra_access (2=0)
In both cases, it says "you specified too many variables".
Can anyone help me with the appropriate codes.
Comment