






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Notes; Class: Introductory Applied Statistics for the Life Sciences; Subject: STATISTICS; University: University of Wisconsin - Madison; Term: Spring 2006;
Typology: Study notes
1 / 12
This page cannot be seen from the preview
Don't miss anything!







Dose of DDT No. survived No. dead 0.0 18 7 0.5 19 6 1.0 12 13 1.5 5 20 2.0 6 19 2.5 2 23 3.0 1 24
1
Continuous: ANOVA ←→ Regression
Binary: k × 2 table ←→?
Goals:
l l
l
l l
l l
0.0 0.5 1.0 1.5 2.0 2.5 3.
dose
proportion dead
3
Model:
y = β 0 + β 1 x 1 + β 2 x 2 + · · · + βkxk + , ∼ iid Normal( 0 , σ^2 )
This implies:
E(y | x 1 ,... , xk) = β 0 + β 1 xk + · · · + βkxk
βi = increase in mean of Y associated with a unit change in xi
ln
( (^) p d 1 − pd
= β 0 + β 1 d
Try least squares, regressing ln
( (^) pˆ d 1 − pˆd
on the dose, d?
Problems:
7
Assume yd ∼ Binomial(nd, pd), yd independent
with logit(pd) = ln( (^1) −pdpd ) = β 0 + β 1 d
Note: pd = e
β 0 +β 1 d 1 + eβ^0 +β^1 d
Likelihood:
L(β 0 , β 1 | y) =
d
py dd ( 1 − pd)(nd−yd)
Logistic regression is a special case of a “generalized linear model”.
Function in R: glm()
glm.out <- glm(n.dead/n ~ dose, weights=n, data=spiders, family=binomial(link=logit)) summary(glm.out)$coef Est SE t-val P-val (Intercept) -1.33 0.33 -4.06 <0. dose 1.44 0.23 6.29 <0.
9
l l
l
l l
l l
0.0 0.5 1.0 1.5 2.0 2.5 3.
dose
proportion dead
glm.out <- glm(n.dead/n ~ dose, weights=n, data=spiders, family=binomial(link=logit)) glm.sum <- summary(glm.out)
co <- glm.out$coef ld50 <- -co[1]/co[2] se.co <- glm.sum$coef[,2] cov.co <- glm.sum$cov.scaled[1,2] se.ld50 <- abs(ld50) * sqrt( (se.co[1]/co[1])^2 + (se.co[2]/co[2])^2 - 2cov.co/(co[1]co[2]) )
ld
se.ld
ld50 + c(-1,1) * qnorm(0.975) * se.ld 0.65 1. 13
l l
l
l l
l l
0.0 0.5 1.0 1.5 2.0 2.5 3.
dose
proportion dead
Tobacco budworm, Heliothis virescens
Batches of 20 male and 20 female worms were given a 3-day dose of pyrethroid trans-cypermethrin The no. dead or “knocked down” in each batch was noted.
Dose Sex 1 2 4 8 16 32 Male 1 4 9 13 18 20 Female 0 2 6 10 12 16
15
l
l
l
l
l
l
l
l
l
l
l
l
0 5 10 15 20 25 30
dose
proportion dead
l l^ MaleFemale
l
l
l
l
l
l
l
l
l
l
l
l
0 5 10 15 20 25 30
dose
proportion dead
Common interceptSeparate intercepts Same curve
19
l
l
l
l
l
l
l
l
l
l
l
l
0 1 2 3 4 5
log 2 dose
proportion dead
l l^ MaleFemale
Assume no sex difference
glm.out <- glm(n.dead/n ~ dose, weights=n, data=worms, family=binomial(link=logit)) summary(glm.out)$coef Est SE t-val P-val (Intercept) -2.77 0.37 -7.6 <0. dose 1.01 0.12 8.1 <0.
Assume sexes completely different
glm.outB <- glm(n.dead/n ~ sex*dose, weights=n, data=worms, family=binomial(link=logit)) summary(glm.outB)$coef Est SE t-val P-val (Intercept) -2.99 0.55 -5.4 <0. sexmale 0.17 0.78 -0.2 0. dose 0.91 0.17 5.4 <0.
sexmale:dose 0.35 0.27 1.3 0. 21
Different slopes but common “intercept”
glm.outC <- glm(n.dead/n ~ dose + sex:dose, weights=n, data=worms, family=binomial(link=logit)) summary(glm.out)$coef Est SE t-val P-val (Intercept) -2.91 0.39 -7.5 <0. dose 0.88 0.13 6.9 <0. dose:sexmale 0.41 0.12 3.3 0.