Académique Documents
Professionnel Documents
Culture Documents
Appendix
(1)
In order to find the equation of the prediction line, we can calculate the estimated slope 1 and estimated
intercept 0 that minimize the total squared prediction error.
T test was used to test whether each coefficient is 0. The test statistic is :
T =
j
tnk+1
sj
(2)
1
2
2
(x
j ) (1 Rj )
i ij
(3)
where
s
sj = s
The rejection region is at significant level = 0.05, therefore, we can conclude the variable is statistical
signifiant predicting the blood glucose level when P (|T | > tobs ) < 0.05.
F test was used to examine whether the model is significant, that is, at least one of the s is not 0.
The test statistic is :
P
M S(reg)
(
y y)2 /k
F =
=P
Fk,nk1
(4)
M S(res)
(yi yi )2 /(n (k + 1))
If fobs > Fk,nk1,=0.05 , we can conclude that the model significantly explained the variance of the
outcome variable.
4.2 R code used for the project
Please see computing project.R
Figures:
30
40
50
60
70
AID
0.01
0.01
0.06
0.00
70
6e+07
0.01
8e+07
1e+08
20
GLUCOSE
40
80
-0.16
120
160
20
30
40
50
60
H4BMI
BIO_SEX4
6e+07
8e+07
1e+08
40
80
120
160
2
0
Sample Quantiles
120
100
-2
80
60
-4
40
Sample Quantiles
140
160
-2
-2
Theoretical Quantiles
Theoretical Quantiles