Thursday, May 2, 2019
Wednesday, April 24, 2019
B1 Book Example of 2x2 Factorial Arrangement of Treatments Without Interaction. Main Effect Contrasts.
B1 Book Example of 2x3 Factorial Arrangement of Treatments With Interaction. Simple Effect Contrasts.
Thursday, April 18, 2019
Friday, April 5, 2019
Thursday, April 4, 2019
Wednesday, April 3, 2019
Effect Modifier Graph. Age is the effect modifier.
Thursday, March 28, 2019
Wednesday, March 27, 2019
Thursday, March 14, 2019
Logistic Regression Worksheet for March 14 Meeting (age, ses, sector as predictors). Uses SAS Proc Logistic
Wednesday, March 13, 2019
Tuesday, March 12, 2019
Thursday, March 7, 2019
Relation of Prob, Odds, and Logit
> p=c(0,.05,.25,.5,.75,.95,1)
> odds=p/(1-p)
> logit=log(p/(1-p))
> cbind(p,odds,logit)
p odds logit
[1,] 0.00 0.00000000 -Inf
[2,] 0.05 0.05263158 -2.944439
[3,] 0.25 0.33333333 -1.098612
[4,] 0.50 1.00000000 0.000000
[5,] 0.75 3.00000000 1.098612
[6,] 0.95 19.00000000 2.944439
[7,] 1.00 Inf Inf
Wednesday, March 6, 2019
Thursday, February 21, 2019
Logistic Regression Example 1 Using R. CHD and AGE
Call:
glm(formula = CHD ~ AGE, family = binomial(logit), data = chd)
Deviance Residuals:
Min 1Q Median 3Q Max
-1.9718 -0.8456 -0.4576 0.8253 2.2859
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -5.30945 1.13365 -4.683 2.82e-06 ***
AGE 0.11092 0.02406 4.610 4.02e-06 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 136.66 on 99 degrees of freedom
Residual deviance: 107.35 on 98 degrees of freedom
AIC: 111.35
Wednesday, February 20, 2019
Monday, February 11, 2019
Thursday, February 7, 2019
Output for Problem 4.40 in B2 Book
> wafer.lm=lm(FAILTIME~TEMP+I(TEMP^2),data=WAFER)
> summary(wafer.lm)
Call:
lm(formula = FAILTIME ~ TEMP + I(TEMP^2), data = WAFER)
Residuals:
Min 1Q Median 3Q Max
-1260.49 -475.70 -15.57 528.45 1131.69
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 154242.914 21868.474 7.053 1.03e-06 ***
TEMP -1908.850 303.664 -6.286 4.92e-06 ***
I(TEMP^2) 5.929 1.048 5.659 1.86e-05 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 688.1 on 19 degrees of freedom
Multiple R-squared: 0.9415, Adjusted R-squared: 0.9354
F-statistic: 152.9 on 2 and 19 DF, p-value: 1.937e-12
Using Estimation Equation for Temp= 140 and 150.
Note 140^2 = 19600
Note 150^2 = 22500
(Failtime | temp = 140) = 154242.914 - 1908.850(140) + 5.929 (19600)
= 3211.191
R Command to compute:↔
predict(wafer.lm,data.frame(TEMP=c(140,150)))
1 2
3211.191 1316.629
> summary(wafer.lm)
Call:
lm(formula = FAILTIME ~ TEMP + I(TEMP^2), data = WAFER)
Residuals:
Min 1Q Median 3Q Max
-1260.49 -475.70 -15.57 528.45 1131.69
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 154242.914 21868.474 7.053 1.03e-06 ***
TEMP -1908.850 303.664 -6.286 4.92e-06 ***
I(TEMP^2) 5.929 1.048 5.659 1.86e-05 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 688.1 on 19 degrees of freedom
Multiple R-squared: 0.9415, Adjusted R-squared: 0.9354
F-statistic: 152.9 on 2 and 19 DF, p-value: 1.937e-12
Using Estimation Equation for Temp= 140 and 150.
Note 140^2 = 19600
Note 150^2 = 22500
(Failtime | temp = 140) = 154242.914 - 1908.850(140) + 5.929 (19600)
= 3211.191
R Command to compute:↔
predict(wafer.lm,data.frame(TEMP=c(140,150)))
1 2
3211.191 1316.629
Quadratic Regression : Output for Problem 4.41 in B2 Book
> plot(Time,SPRate,main="Problem 4.40 in B2 Book")
> rad.lm=lm(SPRate~Time+I(Time^2),data=RADICALS)
> summary(rad.lm)
Call:
lm(formula = SPRate ~ Time + I(Time^2), data = RADICALS)
Residuals:
Min 1Q Median 3Q Max
-0.14134 -0.06653 -0.02948 0.08310 0.13967
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 1.00705 0.07899 12.749 2.46e-08 ***
Time -1.16712 0.12191 -9.574 5.72e-07 ***
I(Time^2) 0.28975 0.03937 7.360 8.73e-06 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 0.1011 on 12 degrees of freedom
Multiple R-squared: 0.9265, Adjusted R-squared: 0.9143
F-statistic: 75.65 on 2 and 12 DF, p-value: 1.574e-07
> rad.lm=lm(SPRate~Time+I(Time^2),data=RADICALS)
> summary(rad.lm)
Call:
lm(formula = SPRate ~ Time + I(Time^2), data = RADICALS)
Residuals:
Min 1Q Median 3Q Max
-0.14134 -0.06653 -0.02948 0.08310 0.13967
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 1.00705 0.07899 12.749 2.46e-08 ***
Time -1.16712 0.12191 -9.574 5.72e-07 ***
I(Time^2) 0.28975 0.03937 7.360 8.73e-06 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 0.1011 on 12 degrees of freedom
Multiple R-squared: 0.9265, Adjusted R-squared: 0.9143
F-statistic: 75.65 on 2 and 12 DF, p-value: 1.574e-07
Thursday, January 31, 2019
Wednesday, January 30, 2019
Thursday, January 24, 2019
Wednesday, January 23, 2019
Example of Two Multiple Regression Fitted Equations That Can Be Graphed
![]() |
| LOS = B0 + B1*age + B2*nnurses |
![]() |
| LOS = B0 + B1*age + B2*nnurses + B3*age*nnurses +B4*age^2 + B5*nnurses^2 |
Tuesday, January 22, 2019
Thursday, January 17, 2019
Wednesday, January 16, 2019
Thursday, January 10, 2019
Hello Biostat 2 Students. Review problems from Chapter 12 in B1 Book.
For Week 1 of the semester I would like for you to review Chapter 12 and see if you can work problems:
12.23(a,c,d,e)
12.25 (b,c,d),
and 12.59 (b,c,d) (the printout provides CI and estimate for problem d).
I recommend that you look at the problems first so you can have an idea of the concepts you need to be looking for in the chapter. The book goes through some arithmetic on calculation of the slope, intercept, and sums of squares for the AOV. Don't worry so much about these calculation details. We will rely on software to calculate these for us. I would like for you to review the printouts and the interpretation of the values therein. We will go over these items on the second week of class.
12.23(a,c,d,e)
12.25 (b,c,d),
and 12.59 (b,c,d) (the printout provides CI and estimate for problem d).
I recommend that you look at the problems first so you can have an idea of the concepts you need to be looking for in the chapter. The book goes through some arithmetic on calculation of the slope, intercept, and sums of squares for the AOV. Don't worry so much about these calculation details. We will rely on software to calculate these for us. I would like for you to review the printouts and the interpretation of the values therein. We will go over these items on the second week of class.
Intro to Stat Book. The B1 Book.
click for printouts
Subscribe to:
Comments (Atom)






