资源描述
实验八 一元线性回归分析、二次回归曲面分析
一、作业题目:
1、某地一年级12名女大学生的体重与肺活量数据如表8-1。试作肺活量(L)对体重(kg)的直线回归分析并回答问题。(杨树勤,卫生统计学,人民卫生出版社,第3版,1999,99)
表7-1 女大学生的体重与肺活量数据
体重(kg),X
42
42
46
46
46
50
50
50
52
58
58
58
肺活量(L),Y
2.55
2.20
2.75
2.40
2.80
2.81
3.41
3.10
3.46
2.85
3.50
3.00
二、程序代码:
DATA CT;
INPUT X Y@@;
CARDS;
42 2.55 42 2.20 46 2.75 46 2.40 46 2.80 50 2.81
50 3.41 50 3.10 52 3.46 58 2.85 58 3.50 58 3.00
;
PROC REG;
MODEL Y=X/P CLI;
OUTPUT OUT=CXX P=PRED L95=L95 U95=U95;
PROC PLOT DATA=CXX;
PLOT PRED*X='P' U95*X='U' L95*X='L'/OVERLAY VPOS=40 HPOS=60;
RUN;
三、输出结果:
SAS 系统 08:38 Friday, May 7, 2004 1
The REG Procedure
Model: MODEL1
Dependent Variable: Y
Analysis of Variance
Sum of Mean
Source DF Squares Square F Value Pr > F
Model 1 0.84532 0.84532 8.10 0.0174
Error 10 1.04391 0.10439
Corrected Total 11 1.88922
Root MSE 0.32310 R-Square 0.4474
Dependent Mean 2.90250 Adj R-Sq 0.3922
Coeff Var 11.13164
Parameter Estimates
Parameter Standard
Variable DF Estimate Error t Value Pr > |t|
Intercept 1 0.52592 0.84036 0.63 0.5454
X 1 0.04769 0.01676 2.85 0.0174
SAS 系统 08:38 Friday, May 7, 2004 2
The REG Procedure
Model: MODEL1
Dependent Variable: Y
Output Statistics
Dependent Predicted Std Error
Obs Variable Value Mean Predict 95% CL Predict Residual
1 2.5500 2.5289 0.1610 1.7246 3.3333 0.0211
2 2.2000 2.5289 0.1610 1.7246 3.3333 -0.3289
3 2.7500 2.7197 0.1133 1.9568 3.4825 0.0303
4 2.4000 2.7197 0.1133 1.9568 3.4825 -0.3197
5 2.8000 2.7197 0.1133 1.9568 3.4825 0.0803
6 2.8100 2.9104 0.0933 2.1611 3.6598 -0.1004
7 3.4100 2.9104 0.0933 2.1611 3.6598 0.4996
8 3.1000 2.9104 0.0933 2.1611 3.6598 0.1896
9 3.4600 3.0058 0.1001 2.2522 3.7595 0.4542
10 2.8500 3.2920 0.1656 2.4830 4.1010 -0.4420
11 3.5000 3.2920 0.1656 2.4830 4.1010 0.2080
12 3.0000 3.2920 0.1656 2.4830 4.1010 -0.2920
Sum of Residuals 0
Sum of Squared Residuals 1.04391
Predicted Residual SS (PRESS) 1.53483
SAS 系统 08:38 Friday, May 7, 2004 3
图: PRED*X. 使用的符号: 'P'。
图: U95*X. 使用的符号: 'U'。
图: L95*X. 使用的符号: 'L'。
|
|
4.5 +
|
|
|
|
| U
4.0 +
|
P |
r | U
e | U
d |
i 3.5 + U
c |
t | U P
e |
d |
|
V 3.0 + P
a | P
l |
u | P
e |
|
o 2.5 + P L
f |
|
Y | L
| L
|
2.0 +
| L
|
| L
|
|
1.5 +
|
--+------+------+------+------+------+------+------+------+--
42 44 46 48 50 52 54 56 58
X
NOTE: 21 个观测被隐藏。
四、结果分析
程序中建立了y与x的关系式:y=a+bx ,并以该模型的观测值、置信度为95%的置信区间的上限及下限为纵坐标,x 为横坐标,在坐标系中作散点图。由输出结果知,第一个线性模型在0.05 水平下是显著的,预测模型为:y=0.52592+0.04769x。所以,女大学生的体重对肺活量的影响是显著的。
展开阅读全文