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
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
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
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;
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 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.