BookmarkSubscribeRSS Feed
UrvishShah
Fluorite | Level 6

hi

i have two dataset like this

data test;

input age;

cards;

20

21

22

;

data test1;

input height;

cards;

5

6

7

;

nw i want to kw the correlation b/w age and height by using proc corr  without merging two datasets coz i have 15 lacks of observation

can anybody tell me the correct solution

2 REPLIES 2
art297
Opal | Level 21

It would help if you show an example of what you are trying to achieve.  Plus, when you post, the subject line is intended to let people know the topic .. not who the poster was.

Ksharp
Super User

Since you do not want merge these two datasets. then use view to make a dummy table which used in proc corr.

Such as:

data corr/view=corr;

merge test test1;

run;

proc corr data=corr ;

var age height;

run

But I strongly recommend you to use proc stdize to standardize the age and heigth to avoid scale issue.

Ksharp

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 635 views
  • 0 likes
  • 3 in conversation