Turn on suggestions

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

Showing results for

- Home
- /
- Programming
- /
- SAS Procedures
- /
- Relation

Options

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

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

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Posted 08-03-2020 09:24 PM
(578 views)

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

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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;
```

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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

**Available on demand!**

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

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.