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
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
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
Thank you so much!
I works really well!
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
Use this tutorial as a handy guide to weigh the pros and cons of these commonly used machine learning algorithms.
Find more tutorials on the SAS Users YouTube channel.