BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Xpcutebear
Fluorite | Level 6

Codepgn.PNG

If I wanted to see if the Age and HR (Heart rate) of the person were related to each other using the "proc" method, how would I do so, using descriptive statistics? Also if the Age and HR had any relation, how would I check if the SBP and Chol have any impact on that relation if it does exist? 

Thanks, 

A Fellow Highschool Student

1 ACCEPTED SOLUTION

Accepted Solutions
SteveDenham
Jade | Level 19

Relative to these two questions: If I wanted to see if the Age and HR (Heart rate) of the person were related to each other using the "proc" method, how would I do so, using descriptive statistics? Also if the Age and HR had any relation, how would I check if the SBP and Chol have any impact on that relation if it does exist? 

 

For this, PROC CORR is probably the easiest to understand.  This will give the correlation between the two variables, which is a measure of how related they are.  For example:

 

proc corr data=have;
var age hr;
run;

This will give you the correlation between Age and HR.

 

The second question is a bit trickier.  If you "partial out" the effects of SBP and Chol you will get the relationship between Age and HR after removing any effects due to SBP and Chol.  This would look like:

proc corr data=have;
var age hr;
partial SBP Chol;
run;

 

This removes the effects of BOTH of the variables.  You could see how removing the effect of just one by specifying only that variable in the PARTIAL statement

 

SteveDenham

View solution in original post

4 REPLIES 4
Xpcutebear
Fluorite | Level 6
Also is there a way to see how many males versus female are in the health table using descriptive statistics?
Xpcutebear
Fluorite | Level 6

Codepgn.PNG

If I wanted to see if the Age and HR (Heart rate) of the person were related to each other using the "proc" method, how would I do so, using descriptive statistics? Also if the Age and HR had any relation, how would I check if the SBP and Chol have any impact on that relation if it does exist? Also I was trying to figure out a way to see how many males versus females are in the health table using descriptive statistics, but none of the graphs or tools in the statistics section seem to help. So I was also hoping there was a way to code that.

(I am a complete novice at SAS, so please don't give too advanced answers please.)

Thanks, 

A Fellow Highschool Student

 

Kurt_Bremser
Super User

Build the means of your variables by age_group (or age, if your sample is significantly larger than what you posted).

Use PROC SUMMARY, e.g.

proc summary data=have mean print;
class age_group;
var hr;
run;
SteveDenham
Jade | Level 19

Relative to these two questions: If I wanted to see if the Age and HR (Heart rate) of the person were related to each other using the "proc" method, how would I do so, using descriptive statistics? Also if the Age and HR had any relation, how would I check if the SBP and Chol have any impact on that relation if it does exist? 

 

For this, PROC CORR is probably the easiest to understand.  This will give the correlation between the two variables, which is a measure of how related they are.  For example:

 

proc corr data=have;
var age hr;
run;

This will give you the correlation between Age and HR.

 

The second question is a bit trickier.  If you "partial out" the effects of SBP and Chol you will get the relationship between Age and HR after removing any effects due to SBP and Chol.  This would look like:

proc corr data=have;
var age hr;
partial SBP Chol;
run;

 

This removes the effects of BOTH of the variables.  You could see how removing the effect of just one by specifying only that variable in the PARTIAL statement

 

SteveDenham

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 4 replies
  • 584 views
  • 0 likes
  • 3 in conversation