Page 1 of 1
recoding/modifying a variable
Posted: Tue Feb 14, 2023 4:09 am
by vasco1966
Hi:
I would like to reduce the number of ordered categories in my dependent variable. How do I do that with Eviews13?
Re: recoding/modifying a variable
Posted: Tue Feb 14, 2023 7:59 am
by EViews Gareth
How would you like to do it?
Re: recoding/modifying a variable
Posted: Tue Feb 14, 2023 8:30 am
by vasco1966
My dependent variable has 11 categories (0-10). I would like to combine categories 0-3, 4-6, and 7-10
Re: recoding/modifying a variable
Posted: Tue Feb 14, 2023 10:04 am
by startz
vasco1966 wrote:My dependent variable has 11 categories (0-10). I would like to combine categories 0-3, 4-6, and 7-10
Code: Select all
series new = @recode(@inlist(old, "0 1 2 3"),1,NA)
new = @recode(@inlist(old, "4 5 6"),2, new)
new = @recode(@inlist(old, "7 8 9 10"),3, new)
Haven't tried, but I think it will work.
Re: recoding/modifying a variable
Posted: Tue Feb 14, 2023 4:20 pm
by vasco1966
Thank you for your help. Will try it and will let you know