list of distinct two variables

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason

basil
Posts: 37
Joined: Thu Apr 28, 2011 11:48 am

list of distinct two variables

Postby basil » Tue May 17, 2011 7:18 am

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?

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13586
Joined: Tue Sep 16, 2008 5:38 pm

Re: list of distinct two variables

Postby EViews Gareth » Tue May 17, 2011 8:39 am

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.

startz
Non-normality and collinearity are NOT problems!
Posts: 3797
Joined: Wed Sep 17, 2008 2:25 pm

Re: list of distinct two variables

Postby startz » Tue May 17, 2011 9:09 am

If you want all the distinct pairs, you could do a cross-tabulation...but it would be pretty ugly.

basil
Posts: 37
Joined: Thu Apr 28, 2011 11:48 am

Re: list of distinct two variables

Postby basil » Tue May 17, 2011 9:19 am

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.


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 2 guests