Hi,
I imported following table from excel
Ran the following
foreach v of var bc7-wc12{
encode `v', gen(`v'_new)
}
drop bc7-wc12
rename *_new *
This codes all values but haphazardly. For example, for bc7, it codes b =1, while b = 2 for wc8.
Could anyone suggest how to fix this?
I imported following table from excel
bc7 | wc7 | bc8 | wc8 | bc9 | wc9 | bc10 | wc10 | bc11 | wc11 | bc12 | wc12 |
b | a | a | b | a | b | a | b | b | a | b | a |
b | a | a | b | a | b | b | a | b | a | a | b |
b | a | a | b | a | b | b | a | b | a | b | a |
b | a | a | b | a | b | a | b | b | a | b | a |
b | a | a | b | a | b | b | a | c | b | b | a |
foreach v of var bc7-wc12{
encode `v', gen(`v'_new)
}
drop bc7-wc12
rename *_new *
This codes all values but haphazardly. For example, for bc7, it codes b =1, while b = 2 for wc8.
Could anyone suggest how to fix this?
Comment