Title: ???????? (GLM)
1???? ????
???????? (GLM)
?? (yi , x i1 , , x ip ) i1,.,n
?? Yi ß0 ß1X i1 . ßpX ip ei,
i1,.,n ?? Yi
???? (dependent var.)
ß0
??? (intercept)
ß1, , ßp
???
Xij ????? (independent var.)
eij
?????? (error)
?? ???????????????????,? p ????? , ????????? ?
E(Y) ß0 ß1X 1 . ßp X p ???Y b0
b1X 1 . bp X p
2- ????
- ?????????? ? E(Y) ß0ß1X1ß2 X2
- ? X1 ?????????X2 ??, ? X2 ????????? X1
- ??, ???????????? (no interaction),
- ???????????????? , ????????
- ???????
- ??ß1?? X2 ??,????(Y)? X1 ?????????????
- ??ß2?? X1 ??,????(Y)? X2
?????????????
- ????????????????
- ? E(Y) ß0ß1X1ß2 X2 ß3X 1 X2
3- ???????
- ? E(Y)ß0ß1X1 ß2 X12 ß3 X2 ß4 X22
ß5X 1 X2 - E(Y)????, ?? regression surface ? response
surface - ?????? ? E(Y) ß0ß1X1 ß2 X12
- ??????? ? E(log(Y)) ß0ß1X1ß2 X2
-
E(Y) ß0 ß1 log(X1) ß2 X22
4??????
???? SS df MS
F p-value ? ?
SSR p MSR FMSR /
MSE p ? ? SSE
n-p-1 MSE ? ? SSTO
n-1
? F ????? Y ? X ??????????
p gta, ??????????? p lta, ??????????
5???? (coef. of determination, R2)
?? 1. R2?? Y ?????? X1,,Xp ?????
2. 0?R2?1 3. R2 ???????????????????
- ??
- ?? X ???? , ??? R2 ??? ?
- ?? R2 ?????????????? ?
- ??????? X ??????????????( Ra2) ????? ?
6??????????
- ???????????????????????
- ??? H0 ? 0 vs. Ha ? ?0 ?????????
? p-? lt a,???????? - ????????????????,???????????????,????????????,??
???(p483)
??18.3b
- ?????????
- ???????????????????
- ????????????????????????
- ?????????,??????????????
7???????????
??? i???(Xi)???? (Y) ?????? H0 ßi
0 Ha ßi ?0 ? t-test ??
p-?,? p-? lt a,?????????????,Xi ? Y ?????
??????? ßi ????? bi ta/2n-p-1 SEbi
8?? 18.3b? ??????????(X1),??(X2),?????????(X3)
?????(Y)???? Data p481
SPSS_????? ? ?? ? ???
?? Pearson???? SPSS_???? ? ???? ? ??
?? ???
???
SAS_??? Analysis ? Descriptive ? Correlation
Columns?? Correlations variables
Correlation ? Pearson SAS_??
Analysis ? Regression ? Linear
Columns?? Dependent variables
Explanatory variables
9??????
Pearson Correlation Coefficients, N 15 Prob gt r under H0 Rho0 Pearson Correlation Coefficients, N 15 Prob gt r under H0 Rho0 Pearson Correlation Coefficients, N 15 Prob gt r under H0 Rho0 Pearson Correlation Coefficients, N 15 Prob gt r under H0 Rho0 Pearson Correlation Coefficients, N 15 Prob gt r under H0 Rho0
 age high treeno diam
ageage 1.00000Â 0.90793lt.0001 0.124580.6582 0.588140.0211
highhigh 0.90793lt.0001 1.00000Â 0.177770.5262 0.763670.0009
treenotreeno 0.124580.6582 0.177770.5262 1.00000Â 0.003470.9902
diamdiam 0.588140.0211 0.763670.0009 0.003470.9902 1.00000Â
.
age, high ? diam?????treeno ? diam??????, age?
high ?????,???????? ?
10????????????
high ??????? age ?treeno ????????
11?? age,high ????????
high ??????? age ????????
12 high ? Diam ?????
Root MSE 0.42695 R-Square
0.5889
Parameter Estimates
Parameter Standard Variable
Label DF Estimate Error
t Value Pr gt t Intercept Intercept
1 3.59373 0.60940 5.90
lt.0001 high ?? 1 0.05350
0.01240 4.32 0.0008
????? ?? 3.59 .0535 (??) ,R2
0.589
(.0124) ??????,??????0.0535???????????
??? Model selection method ?? Stepwise
??????,??? stepwise ?????????
13?????? ?
??????????? , ?????????????,??? ?????
(Diagnostics) ?????????????????
?? (residual)
?? , ei ,???????? , ???????? , ei Yi - EYi
????? ,??????? ei ???.
t ??? ? MSE ?? ei ????, ? ei ????????
????? 1. ?????? 0? 2.
??????????? MSE,? s2 ??????? 3. ei ??? -3
? 3 ???
14?18.3b ???? (Forest Study p481)
15??????????? ----- Lack-of-Fit F Test
- ??X?Y????????????
- ?????????? X ???????? (replicates)
- ?????
- ???? Y ???1???,2???????,
-
3????????
- H0Yi ß0 ß1Xi ei (?????)
- H1Yi ?ß0 ß1Xi ei (??????)
.
16ANOVA ?
? SSE SSLF SSPE, SSTO SSR SSE
?? SAS ????????? ?data??????????? lof 1 2
3 .. Type I lof ???????????,??? ?????????,?????
???????
17age bp lof
20 102 1
20 110 1
20 108 1
30 120 2
30 115 2
30 118 2
30 112 2
40 126 3
40 119 3
40 120 3
50 135 4
50 130 4
50 136 4
50 128 4
60 150 5
60 146 5
60 148 5
60 138 5
60 140 5
70 160 6
70 155 6
70 159 6
70 150 6
Lack-of-Fit Data for SAS
18?Exp 18.6.b??????????? (p428)
Sum
of Source DF Squares
Mean Square F Value Pr gt F Model
5 6305.705797
1261.141159 68.27 lt.0001 Error
17 314.033333 18.472549
Source DF Type I SS
Mean Square F Value Pr gt F age
1 6228.709640 6228.709640
337.19 lt.0001 lof
4 76.996157 19.249039
1.04 0.4146
Root MSE 4.31514 R-Square
0.9409 Parameter
Estimates
Parameter Standard Variable DF
Estimate Error t Value
Pr gt t Intercept 1
85.50938 2.67183 32.00
lt.0001 age 1 0.97989
0.05358 18.29 lt.0001
19ANOVA ?
? Lack-of-fit test ?? F 1.04,p-value .4146 gt
0.05, ????a.05 ?,??????? ???? ?? 85.5
0.98 (??),R2 0.94,
(.0536) ??????,?????? 0.98?
20??????(Logistic Regression model)
--- ??????????????? ( p487) ?????(Y)
????????,? 1? 0 ???
Model Yi EYi ei
? Model ?? logistic regression model
21???????????ß0 ?ß1,??????????
22?Exp 18.6.1???????CHD??? (p489)
????????
23SPSS_?????? ? ??? ?? Logistic
?? ???
???,?????????
SAS_???? Analysis ? Regression ? Logistic
Columns?? Dependent variables (??????)
Quantitative
variables
Classification variables
Frequency variabl
Statistics ? logit
24SAS ??
Testing Global Null Hypothesis BETA0
Test Chi-Square DF
Pr gt ChiSq Likelihood Ratio
29.7851 1 lt.0001 Score
27.0896 1
lt.0001 Wald
22.6152 1 lt.0001
Analysis of Maximum Likelihood Estimates
Standard
Wald Parameter DF Estimate
Error Chi-Square Pr gt ChiSq Intercept
1 -4.6486 0.9775
22.6171 lt.0001 age 1
0.0881 0.0185 22.6152
lt.0001 Odds Ratio
Estimates Point
95 Wald Effect Estimate
Confidence Limits age
1.092 1.053 1.132
25(1) ????? Wald test ? p-? lt
0.05,???????? (2) ???????????????? z -
4.65 0.0881 (??) 58??????
42??????? 0.279
(3) ???(odds ratio,OR ) ????????? OR
exp(0.0881) 1.092 .
???????CHD???(??)????1.09 ?
26?Exp 18.6.3??????????????????????
(p498)
Testing Global Null Hypothesis BETA0
Test Chi-Square
DF Pr gt ChiSq Likelihood Ratio
24.3214 2 lt.0001
Score 17.5848
2 0.0002 Wald
9.0173 2
0.0110 Analysis of Maximum Likelihood
Estimates
Standard Wald Parameter DF
Estimate Error Chi-Square Pr
gt ChiSq Intercept 1 -9.5083
3.2208 8.7150 0.0032 air
1 3.8737 1.4229
7.4112 0.0065 trans 1
2.6402 0.9113 8.3942
0.0038 Odds Ratio
Estimates Point
95 Wald Effect
Estimate Confidence Limits air
48.120 2.959 782.573
trans 14.016 2.349
83.621
27(1) ????? Wald test ? p-? lt 0.05, X1
,X2?????? (2) ????????? z - 9.51 3.87 X1
2.64 X2 ???
(3) ??? X1 OR 48.1,???????,????????,
??????????? 48.1 ? X2OR
14.0,???????,????????,
???????????14 ?