turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Data Mining
- /
- Creating a data of pairs

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

03-27-2013 02:33 AM

Hi all,

I have a data whose number of variables is over 1,000.

Since the number of variables is too large to process the analysis that I am going to use,

me and my collage decided to reduce the number of variables using correlations.

We already created the correlations between the variables and extract some parts of the data (which have 0.8 or greater correlation)

and created a table which only have the pairs of the variables.

The data that I currently have looks like..

x y

2 1

3 1

5 1

6 2

1 2

7 2

5 2

3 2

1 3

2 3

8 3

......

But it is hard to see which variables are paired up with this data( due to the large number of observation)

I want to create a table which looks like

group pair1 pair2 pair3 pair4 ....

1 2 3 5 .

2 6 7 5 3

3 8 . . .

.....

which shows us which variables are paired up more clearly.

But I do not have any idea how to start it.

Can anyone give me some advice?

Thank you for your help in advance.

There are over 700,000 observations in this data

Accepted Solutions

Solution

03-27-2013
10:32 AM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

03-27-2013 10:32 AM

This should do it :

**proc sort data=pairs; by x y; run;**

** **

**data pairList;****length group 8;****array pair{100};****do i=1 by 1 until(last.x);**** set pairs; by x;**** group=x;**** pair{i} = y;**** end;****drop i x y;****run;**

PG

PG

All Replies

Solution

03-27-2013
10:32 AM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

03-27-2013 10:32 AM

This should do it :

**proc sort data=pairs; by x y; run;**

** **

**data pairList;****length group 8;****array pair{100};****do i=1 by 1 until(last.x);**** set pairs; by x;**** group=x;**** pair{i} = y;**** end;****drop i x y;****run;**

PG

PG

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

03-27-2013 05:57 PM

Thank you so much!

I works really well!