Hi,
I am brooding over this (for me) really complicated STATA problem. The dataset I have gave participants the options to tick multiple possibilities of diet type (Veggie, Vegan, Omnivore, Pescetarian, Low-calorie, Gluten-free). When imported STATA takes this as string data. I encoded this and created a new variable with the encode command.
My aim is to simply summarize into the 3 categories Veggie, Vegan, Omnivore, however my problem is that I cannot recode the values e.g. Omnivore | Gluten-free into just "Omnivore" or a number, plus there are a lot combinations (e.g. Low-calorie| Gluten-free | Vegan) . Every attempt with the recode command did not work and showed error messages.
Many thanks for your help in advance
Best wishes,
Lena
I am brooding over this (for me) really complicated STATA problem. The dataset I have gave participants the options to tick multiple possibilities of diet type (Veggie, Vegan, Omnivore, Pescetarian, Low-calorie, Gluten-free). When imported STATA takes this as string data. I encoded this and created a new variable with the encode command.
My aim is to simply summarize into the 3 categories Veggie, Vegan, Omnivore, however my problem is that I cannot recode the values e.g. Omnivore | Gluten-free into just "Omnivore" or a number, plus there are a lot combinations (e.g. Low-calorie| Gluten-free | Vegan) . Every attempt with the recode command did not work and showed error messages.
Many thanks for your help in advance
Best wishes,
Lena
Comment