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

## Relation

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
Jade | Level 19

## Re: Relation

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

4 REPLIES 4
Fluorite | Level 6

## Re: Relation

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

## Relation

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

Super User

## Re: Relation

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;``````
Jade | Level 19

## Re: Relation

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

Discussion stats
• 4 replies
• 579 views
• 0 likes
• 3 in conversation