In: Statistics and Probability
Using this SAS code for the data. The outcome variable is SBP and should be coded to appear on the y-axis. Note: you have to write the appropriate program Answer the following questions: Report the correlation coefficient and the p-value. (2pts) Report the parameter estimate for the intercept and heart rate (4pts) Using the regression equation, what is the expected blood pressure for someone with a heart rate of 153? (4pts) data sas_test; input hr sbp; datalines; 35 80 50 82 52 81 58 95 62 105 65 107 67 105 74 120 89 149 101 157 120 202 185 160 ; run;
Solution-A:
with proc corr get the correlation coeffcient and p value
SAS CODE:
data sas_test;
input hr sbp @@;
datalines;
35 80 50 82 52 81 58 95 62 105 65 107 67 105 74 120 89 149 101 157
120 202 185 160
;
run;
proc corr data=sas_test;
var sbp;
with hr;
run
Output:
The CORR Procedure
| 1 With Variables: | hr | 
|---|---|
| 1 Variables: | sbp | 
| Simple Statistics | ||||||
|---|---|---|---|---|---|---|
| Variable | N | Mean | Std Dev | Sum | Minimum | Maximum | 
| hr | 12 | 79.83333 | 40.55711 | 958.00000 | 35.00000 | 185.00000 | 
| sbp | 12 | 120.25000 | 38.54425 | 1443 | 80.00000 | 202.00000 | 
| Pearson Correlation Coefficients, N = 12 Prob > |r| under H0: Rho=0  | 
|
|---|---|
| sbp | |
| hr | 
 0.80023 0.0018  | 
correlation coeffcient,r=0.80023
p value=0.0018
There exists a strong positive relationship between sbp and hr and relationship is statistically significant
Solution-b:
with proc reg find regression equation of sbp on hr
SAS Code:
proc reg data=sas_test;
model sbp=hr;
run;
Output:
The REG Procedure
Model: MODEL1
Dependent Variable: sbp
| Number of Observations Read | 12 | 
|---|---|
| Number of Observations Used | 12 | 
| Analysis of Variance | |||||
|---|---|---|---|---|---|
| Source | DF | Sum of Squares  | 
Mean Square  | 
F Value | Pr > F | 
| Model | 1 | 10465 | 10465 | 17.81 | 0.0018 | 
| Error | 10 | 5877.18707 | 587.71871 | ||
| Corrected Total | 11 | 16342 | 
| Root MSE | 24.24291 | R-Square | 0.6404 | 
|---|---|---|---|
| Dependent Mean | 120.25000 | Adj R-Sq | 0.6044 | 
| Coeff Var | 20.16042 | 
| Parameter Estimates | |||||
|---|---|---|---|---|---|
| Variable | DF | Parameter Estimate  | 
Standard Error  | 
t Value | Pr > |t| | 
| Intercept | 1 | 59.53557 | 15.99988 | 3.72 | 0.0040 | 
| hr | 1 | 0.76051 | 0.18023 | 4.22 | 0.0018 | 
The REG Procedure
Model: MODEL1
Dependent Variable: sbp



From regression output:
model is
sbp=59.53557+0.76051*hr
expected blood pressure for someone with a heart rate of 153 ,substitute hr=153
sbp=59.53557+0.76051*153
= 175.8936
expected blood pressure=175.8936