Page 1 of 1
list of distinct two variables
Posted: Tue May 17, 2011 7:18 am
by basil
How do I get the list of distinct combination of two (or more) variables? In sql, the list would be simply "select distinct x,y from table". In EViews, to get distinct list of one variable, I use the command "freeze(mode=overwrite, distinct_list) x.freq(nov,noa)". But what command would give a distinct list for two (or more) variables in EViews?
Re: list of distinct two variables
Posted: Tue May 17, 2011 8:39 am
by EViews Gareth
I assume you have two series, and you want a list of unique values in both series? There isn't an easy way to do that. Perhaps the best way to do it is to create a new workfile page that is twice as long as your existing page, stack the two series on top of each other as one big series, and then do the same freq calculation.
Re: list of distinct two variables
Posted: Tue May 17, 2011 9:09 am
by startz
If you want all the distinct pairs, you could do a cross-tabulation...but it would be pretty ugly.
Re: list of distinct two variables
Posted: Tue May 17, 2011 9:19 am
by basil
Thx. It is the latter- looking to get distinct pairs. N-way tabulation (with count, list layout) would do, but I have to go over the outcome and clean the cases with zero count to get the actual list. I was hoping for an easier way.