An Introduction to Categorical Data Analysis
Alan Agresti, 3rd Edition
Parametric inferential statistical analysis requires assumptions about the probability distributions of categorical response variables
Key distributions for categorical response:
(1.2.1) Binomial Distribution
When \(\pi = 0.5\), the binomial distribution is symmetric
Normal Approximation to Binomial Distribution:
(1.2.2) Multinomial Distribution
(1.3.1) Likelihood & Maximum Likelihood Estimation
(1.3.2) Significance Tests about a binomial parameter
# obtain and plot Binomial(n=10, pi=1/4) probabilities
options(scipen = 999)
y <- 0:10
prob <- round(dbinom(y, 10, 0.25), 6)
prob [1] 0.056314 0.187712 0.281568 0.250282 0.145998 0.058399 0.016222
[8] 0.003090 0.000386 0.000029 0.000001
[1] 0.0003 0.0027 0.0107 0.0286 0.0573 0.0916 0.1221 0.1396 0.1396 0.1241
[11] 0.0993 0.0722 0.0481 0.0296 0.0169 0.0090 0.0045 0.0021 0.0009 0.0004
[21] 0.0002
[1] 0.8158858
dpois(0, 8) + dpois(1, 8) + dpois(2, 8) + dpois(3, 8) + dpois(4, 8) + dpois(5,
8) + dpois(6, 8) + dpois(7, 8) + dpois(8, 8) + dpois(9, 8) + dpois(10, 8)[1] 0.8158858
[1] 0.8116204
# Multinomial sample of size 4, 4 categories, probs = 0.4 0.3 0.2 0.1 prob
# of getting one of each
dmultinom(c(1, 1, 1, 1), size = 4, prob = c(0.4, 0.3, 0.2, 0.1), log = FALSE)[1] 0.0576
[1] 0.0576
# Multinomial calculations Shafer Lecture 3
dmultinom(c(3, 2, 7), size = 12, prob = c(0.2, 0.15, 0.65), log = FALSE)[1] 0.06988616
[1] 0.02523667
[1] 0.2748779
[1] 0.2748779
# Plot Likelihood for Binomial (n = 5, y = 2)
L.binomial <- function(pi, n, y) choose(n, y) * (pi^y) * ((1 - pi)^(n - y))
pix <- seq(0, 1, length = 1000)
like <- L.binomial(pix, 5, 2)
plot(pix, like, type = "l", lwd = 3, xlab = "Success Probability", ylab = "Likelihood",
col = "orange")# Wald confidence interval for binomial proportion
0.4 + c(-1, 1) * qnorm(0.975) * sqrt(0.4 * 0.6/5)[1] -0.02940659 0.82940659
[1] -0.02940659 0.82940659
method x n mean lower upper
1 asymptotic 2 5 0.4 -0.02940659 0.8294066
# Binomial LL plot to show effect of increasing sample size
LL.binomial <- function(pi, n, y) y * log(pi) + (n - y) * log(1 - pi)
pi1 <- seq(0, 1, length = 1000)
z1 <- LL.binomial(pi1, 4, 1) - (1 * log(1) + 3 * log(3) - 4 * log(4))
z2 <- LL.binomial(pi1, 40, 10) - (10 * log(10) + 30 * log(30) - 40 * log(40))
z3 <- LL.binomial(pi1, 400, 100) - (100 * log(100) + 300 * log(300) - 400 *
log(400))
yrange <- c(-4, 0)
plot(pi1, z1, type = "l", lwd = 3, xlab = "Success Probability", ylab = "Log-Likelihood (shifted up to zero)",
ylim = yrange, col = "black")
par(new = T)
plot(pi1, z2, type = "l", lwd = 3, xlab = "", ylab = "", ylim = yrange, col = "blue")
par(new = T)
plot(pi1, z3, type = "l", lwd = 3, xlab = "", ylab = "", ylim = yrange, col = "purple")# Wald confidence interval for binomial proportion
0.25 + c(-1, 1) * qnorm(0.975) * sqrt(0.25 * 0.75/4)[1] -0.1743447 0.6743447
[1] -0.1743447 0.6743447
method x n mean lower upper
1 asymptotic 1 4 0.25 -0.1743447 0.6743447
# Finding LRCI for binomial proportion
LBCI.endpoint <- function(pi) {
y <- 1
n <- 4
y * log(pi) + (n - y) * log(1 - pi) - (y * log(y) + (n - y) * log(n - y) -
n * log(n) - 0.5 * qchisq(0.95, 1))
}
left <- uniroot(LBCI.endpoint, c(0, 0.25))
left$root[1] 0.01623382
[1] 0.7224464
[1] -4.17007
method x n mean lower upper
1 lrt 1 4 0.25 0.01623238 0.7224088
# Now plot the LL function and cut line and LRCI points on the plot
pi <- seq(1e-04, 0.8, length = 1000)
LL <- log(pi) + 3 * log(1 - pi)
LLmax <- log(0.25) + 3 * log(0.75)
LLmax[1] -2.249341
[1] -4.17007
yrange <- range(-5, -2.249341)
xrange <- range(pi)
plot(pi, LL, type = "l", lwd = 3, xlab = "pi", ylab = "Log Likelihood", xlim = xrange,
ylim = yrange)
cutline <- rep(-4.17007, length(pi))
par(new = T)
plot(pi, cutline, type = "l", lwd = 3, lty = 3, xlab = "", ylab = "", xlim = xrange,
ylim = yrange, col = "purple")
points(0.01623238, -4.17007, pch = 19, cex = 1.5, col = "darkgreen")
points(0.7224088, -4.17007, pch = 19, cex = 1.5, col = "darkgreen")# Now Shafer-type (Lecture 2, p.14) Modified Wald confidence interval
y <- 1
n <- 4
p.tilde <- (y + 0.5)/(n + 1)
p.tilde + c(-1, 1) * qnorm(0.975) * sqrt(p.tilde * (1 - p.tilde)/(n + 1))[1] -0.1016731 0.7016731
[1] -3.361784 1.164559
[1] 0.0335114 0.7621602
method x n mean lower upper
1 logit 1 4 0.25 0.0335114 0.7621602
[1] 0.03157783
Chi-squared test for given probabilities
data: obs.data
X-squared = 6.9106, df = 2, p-value = 0.03158
# GOF test for primary/secondard infection example Pearson chi-square
# calculation and p-value; Agresti, p.37
xsq <- ((30 - 38.06590216)^2/38.06590216 + (63 - 38.9943388)^2/38.9943388 +
(63 - 78.93975904)^2/78.93975904)
xsq[1] 19.70606
[1] 0.000009031458
# Likelihood chi-square calculation and p-value; Agresti, p.38
gsq <- 2 * (30 * log(30/38.06590216) + 63 * log(63/38.9943388) + 63 * log(63/78.93975904))
gsq[1] 17.73787
[1] 0.00002535289
# Agresti Intro CDA book, Chapter 1 work Agresti p.7ff HT and CI binomial
# proportion
y <- 837
n <- 1810
prop.test(y, n, p = 0.5, alternative = "two.sided", correct = F)
1-sample proportions test without continuity correction
data: y out of n, null probability 0.5
X-squared = 10.219, df = 1, p-value = 0.00139
alternative hypothesis: true p is not equal to 0.5
95 percent confidence interval:
0.4395653 0.4854557
sample estimates:
p
0.4624309
method x n mean lower upper
1 asymptotic 837 1810 0.4624309 0.4394616 0.4854003
method x n mean lower upper
1 wilson 837 1810 0.4624309 0.4395653 0.4854557
# So the CI method in the prop.test function is the Wilson/Score method
# Agresti p.9 Score CI
y <- 9
n <- 10
binom.confint(y, n, conf.level = 0.95, method = "wilson") method x n mean lower upper
1 wilson 9 10 0.9 0.59585 0.9821238
method x n mean lower upper
1 asymptotic 9 10 0.9 0.7140615 1.085939
method x n mean lower upper
1 lrt 9 10 0.9 0.6283633 0.9940051
# Agresti p.9 Witmer Modified Wald also called Agresti-Coull
y <- 10
n <- 10
pi.tilde2 <- (y + 2)/(n + 4)
pi.tilde2[1] 0.8571429
[1] 0.6738432 1.0404425
method x n mean lower upper
1 wilson 10 10 1 0.7224672 1
# Agresti p.12 Binomial example
y <- 9
n <- 10
pi.hat <- y/n
se <- sqrt(pi.hat * (1 - pi.hat)/10)
WTS <- (pi.hat - 0.5)/se
CSTS <- WTS^2
CSTS[1] 17.77778
[1] 0.00002482661
1-sample proportions test without continuity correction
data: y out of n, null probability 0.5
X-squared = 6.4, df = 1, p-value = 0.01141
alternative hypothesis: true p is not equal to 0.5
95 percent confidence interval:
0.5958500 0.9821238
sample estimates:
p
0.9
# Agresti p.19 Binomial example
y <- 9
n <- 10
binom.confint(y, n, conf.level = 0.95, method = "asymptotic") method x n mean lower upper
1 asymptotic 9 10 0.9 0.7140615 1.085939
method x n mean lower upper
1 wilson 9 10 0.9 0.59585 0.9821238
method x n mean lower upper
1 agresti-coull 9 10 0.9 0.5740323 1.003941
method x n mean lower upper
1 lrt 9 10 0.9 0.6283633 0.9940051
Exact binomial test
data: y and n
number of successes = 9, number of trials = 10, p-value = 0.02148
alternative hypothesis: true probability of success is not equal to 0.5
95 percent confidence interval:
0.5549839 0.9974714
sample estimates:
probability of success
0.9
Exact binomial test
data: y and n
number of successes = 9, number of trials = 10, p-value = 0.01074
alternative hypothesis: true probability of success is greater than 0.5
95 percent confidence interval:
0.6058367 1.0000000
sample estimates:
probability of success
0.9
Exact one-sided binomial test, mid-p version
data: y and n
number of successes = 9, number of trials = 10, p-value = 0.005859
alternative hypothesis: true probability of success is greater than 0.5
95 percent confidence interval:
0.6504873 1.0000000
sample estimates:
probability of success
0.9
Exact two-sided binomial test (central method), mid-p version
data: y and n
number of successes = 9, number of trials = 10, p-value = 0.01172
alternative hypothesis: true probability of success is not equal to 0.5
95 percent confidence interval:
0.5965206 0.9950264
sample estimates:
probability of success
0.9
data:
95 percent confidence interval:
0.5966 0.9946
# p.30 Table 2.2
# Find Wald CI for difference of binomial proportions
n11 <- 189
n1 <- 11034
pi1.hat <- n11/n1
n21 <- 104
n2 <- 11037
pi2.hat <- n21/n2
diff <- pi1.hat - pi2.hat
se.diff <- sqrt(pi1.hat * (1 - pi1.hat)/n1 + pi2.hat * (1 - pi2.hat)/n2)
se.diff[1] 0.001539964
[1] 0.004687751 0.010724297
2-sample test for equality of proportions without continuity
correction
data: c(n11, n21) out of c(n1, n2)
X-squared = 25.014, df = 1, p-value = 0.0000005692
alternative hypothesis: two.sided
95 percent confidence interval:
0.004687751 0.010724297
sample estimates:
prop 1 prop 2
0.01712887 0.00942285
# Find Agresti-Caffo adjusted CI for difference of binomial proportions -
# adds 1 to each cell install.packages('PropCIs') library(PropCIs)
wald2ci(n11, n1, n21, n2, conf.level = 0.95, adjust = "AC")
data:
95 percent confidence interval:
0.004676768 0.010732536
sample estimates:
[1] 0.007704652
# Find SCORE CI for difference of binomial proportions
# install.packages('PropCIs') library(PropCIs)
diffscoreci(n11, n1, n21, n2, conf.level = 0.95) # Produces SCORE CI for diff
data:
95 percent confidence interval:
0.004716821 0.010788501
# Relative risk (RR)
# Find Modified Wald CI for RR
phi.hat <- log(pi1.hat/pi2.hat)
se.phi.hat <- sqrt((1 - pi1.hat)/n11 + (1 - pi2.hat)/n21)
WCI.trans.RR <- phi.hat + c(-1, 1) * qnorm(0.975) * se.phi.hat
WCI.RR <- exp(WCI.trans.RR)
WCI.RR[1] 1.433031 2.305884
[1] 1.817802
[1] 1.268501
[1] 1.433031
[1] 2.305884
data:
95 percent confidence interval:
1.433904 2.304713
[1] 189
[1] 11034
[1] 104
[1] 11037
theta.hat <- (n11 * (n2 - n21))/(n21 * (n1 - n11))
Ltheta.hat <- log(theta.hat)
se.Ltheta.hat <- sqrt(1/n11 + 1/(n2 - n21) + 1/n21 + 1/(n1 - n11))
WCI.LOR <- Ltheta.hat + c(-1, 1) * qnorm(0.975) * se.Ltheta.hat
WCI.OR <- exp(WCI.LOR)
WCI.OR[1] 1.440042 2.330780
[1] 1.832054
[1] 1.272222
[1] 1.440042
[1] 2.33078
$data
Outcome
Predictor Disease1 Disease2 Total
Exposed1 189 10845 11034
Exposed2 104 10933 11037
Total 293 21778 22071
$measure
odds ratio with 95% C.I.
Predictor estimate lower upper
Exposed1 1.000000 NA NA
Exposed2 1.832054 1.440042 2.33078
$p.value
two-sided
Predictor midp.exact fisher.exact chi.square
Exposed1 NA NA NA
Exposed2 0.0000004989646 0.0000005032836 0.0000005691897
$correction
[1] FALSE
attr(,"method")
[1] "Unconditional MLE & normal approximation (Wald) CI"
data:
95 percent confidence interval:
1.440802 2.329551
# Chi-square Test of Indendence 2 by 3 Table 2.4 on p.39
## PROBLEMATIC BECAUSE LINK WILL NOT WORK & DATA CANNOT BE IMPORTED##
Political <- read.table("/Users/Patrick/Dropbox/data/agresti/Political.dat",
header = T)
head(Political) person gender party
1 1 female Dem
2 2 female Dem
3 3 female Dem
4 4 female Dem
5 5 female Dem
6 6 female Dem
person gender party
2445 2445 male Ind
2446 2446 male Ind
2447 2447 male Ind
2448 2448 male Ind
2449 2449 male Ind
2450 2450 male Ind
person gender party
Min. : 1.0 female:1357 Dem: 825
1st Qu.: 613.2 male :1093 Ind:1088
Median :1225.5 Rep: 537
Mean :1225.5
3rd Qu.:1837.8
Max. :2450.0
'data.frame': 2450 obs. of 3 variables:
$ person: int 1 2 3 4 5 6 7 8 9 10 ...
$ gender: Factor w/ 2 levels "female","male": 1 1 1 1 1 1 1 1 1 1 ...
$ party : Factor w/ 3 levels "Dem","Ind","Rep": 1 1 1 1 1 1 1 1 1 1 ...
Party <- factor(Political$party, levels = c("Dem", "Rep", "Ind"))
GenderGap <- xtabs(~gender + Party, data = Political)
GenderGap Party
gender Dem Rep Ind
female 495 272 590
male 330 265 498
[,1] [,2] [,3]
[1,] 495 272 590
[2,] 330 265 498
Pearson's Chi-squared test
data: GenderGap
X-squared = 12.569, df = 2, p-value = 0.001865
y11 <- 495
y12 <- 272
y13 <- 590
n1p <- y11 + y12 + y13
y21 <- 330
y22 <- 265
y23 <- 498
n2p <- y21 + y22 + y23
npp <- n1p + n2p
np1 <- y11 + y21
np2 <- y12 + y22
np3 <- y13 + y23
e11 <- np1 * n1p/npp
e12 <- np2 * n1p/npp
e13 <- np3 * n1p/npp
e21 <- np1 * n2p/npp
e22 <- np2 * n2p/npp
e23 <- np3 * n2p/npp
X2 <- (y11 - e11)^2/e11 + (y12 - e12)^2/e12 + (y13 - e13)^2/e13 + (y21 - e21)^2/e21 +
(y22 - e22)^2/e22 + (y23 - e23)^2/e23
X2[1] 12.56926
[1] 0.00186475
G2 <- 2 * (y11 * log(y11/e11) + y12 * log(y12/e12) + y13 * log(y13/e13) + y21 *
log(y21/e21) + y22 * log(y22/e22) + y23 * log(y23/e23))
G2[1] 12.6009
[1] 0.001835477
Party
gender Dem Rep Ind
female 3.272365 -2.498557 -1.032199
male -3.272365 2.498557 1.032199
mosaic(GenderGap, gp = shading_Friendly, residuals = stdres, residuals_type = "Std\nresiduals",
labeling = labeling_residuals)# Now let's partition the above G2 TS into two orthogonal pieces; see
# pp.41-42
# First piece
y11 <- 495
y12 <- 272
n1p <- y11 + y12
y21 <- 330
y22 <- 265
n2p <- y21 + y22
npp <- n1p + n2p
np1 <- y11 + y21
np2 <- y12 + y22
e11 <- np1 * n1p/npp
e12 <- np2 * n1p/npp
e21 <- np1 * n2p/npp
e22 <- np2 * n2p/npp
G2 <- 2 * (y11 * log(y11/e11) + y12 * log(y12/e12) + y21 * log(y21/e21) + y22 *
log(y22/e22))
G2[1] 11.53574
[1] 0.0006827076
# Second piece
y11 <- 767
y12 <- 590
n1p <- y11 + y12
y21 <- 595
y22 <- 498
n2p <- y21 + y22
npp <- n1p + n2p
np1 <- y11 + y21
np2 <- y12 + y22
e11 <- np1 * n1p/npp
e12 <- np2 * n1p/npp
e21 <- np1 * n2p/npp
e22 <- np2 * n2p/npp
G2 <- 2 * (y11 * log(y11/e11) + y12 * log(y12/e12) + y21 * log(y21/e21) + y22 *
log(y22/e22))
G2[1] 1.065158
[1] 0.3020418
# p.44 Table 2.6
Malform <- matrix(c(17066, 14464, 788, 126, 37, 48, 38, 5, 1, 1), ncol = 2)
Malform [,1] [,2]
[1,] 17066 48
[2,] 14464 38
[3,] 788 5
[4,] 126 1
[5,] 37 1
Cochran-Mantel-Haenszel Statistics
AltHypothesis Chisq Df Prob
cor Nonzero correlation 6.5699 1 0.010372
rmeans Row mean scores differ 12.0817 4 0.016754
cmeans Col mean scores differ 6.5699 1 0.010372
general General association 12.0817 4 0.016754
[1] 2.563182
[1] 0.005185889
[1] 0.01420181
# FET: Fisher's Exact Test
# In-class Example
Madeuptea <- matrix(c(5, 2, 1, 7), ncol = 2)
Madeuptea [,1] [,2]
[1,] 5 1
[2,] 2 7
Fisher's Exact Test for Count Data
data: Madeuptea
p-value = 0.03497
alternative hypothesis: true odds ratio is greater than 1
95 percent confidence interval:
1.179718 Inf
sample estimates:
odds ratio
13.59412
[1] 0.03496503
[1] 0.03496503
f0 <- choose(6, 0) * choose(9, 7)/choose(15, 7)
f1 <- choose(6, 1) * choose(9, 6)/choose(15, 7)
f2 <- choose(6, 2) * choose(9, 5)/choose(15, 7)
f3 <- choose(6, 3) * choose(9, 4)/choose(15, 7)
f4 <- choose(6, 4) * choose(9, 3)/choose(15, 7)
f5 <- choose(6, 5) * choose(9, 2)/choose(15, 7)
f6 <- choose(6, 6) * choose(9, 1)/choose(15, 7)
cbind(0:6, c(f0, f1, f2, f3, f4, f5, f6)) [,1] [,2]
[1,] 0 0.005594406
[2,] 1 0.078321678
[3,] 2 0.293706294
[4,] 3 0.391608392
[5,] 4 0.195804196
[6,] 5 0.033566434
[7,] 6 0.001398601
Fisher's Exact Test for Count Data
data: Madeuptea
p-value = 0.04056
alternative hypothesis: true odds ratio is not equal to 1
95 percent confidence interval:
0.8646648 934.0087368
sample estimates:
odds ratio
13.59412
choose(6, 5) * choose(9, 2)/choose(15, 7) + choose(6, 6) * choose(9, 1)/choose(15,
7) + choose(6, 0) * choose(9, 7)/choose(15, 7)[1] 0.04055944
one.sided two.sided
1 0.01818182 0.03636364
[1] 1.154754 465.760830
[,1] [,2]
[1,] 3 1
[2,] 1 3
Fisher's Exact Test for Count Data
data: Fisherstea
p-value = 0.4857
alternative hypothesis: true odds ratio is not equal to 1
95 percent confidence interval:
0.2117329 621.9337505
sample estimates:
odds ratio
6.408309
Fisher's Exact Test for Count Data
data: Fisherstea
p-value = 0.2429
alternative hypothesis: true odds ratio is greater than 1
95 percent confidence interval:
0.3135693 Inf
sample estimates:
odds ratio
6.408309
one.sided two.sided
1 0.1285714 0.2571429
[1] 0.3100508 306.6338538
# Snoring and Heart Disease pp.69-72
df.heart <- read.table("/Users/Patrick/Dropbox/data/agresti/Heart.dat", header = T)
df.heart <- df.heart %>% mutate(x = dplyr::recode(snoring, never = 0, occasional = 2,
nearly_every_night = 4, every_night = 5), n = yes + no, PctYes = yes/n) %>%
dplyr::select(snoring, x, yes, no, n, PctYes)
kable(df.heart, caption = "Snoring and Heart Disease pp.69-72")| snoring | x | yes | no | n | PctYes |
|---|---|---|---|---|---|
| never | 0 | 24 | 1355 | 1379 | 0.0174039 |
| occasional | 2 | 35 | 603 | 638 | 0.0548589 |
| nearly_every_night | 4 | 21 | 192 | 213 | 0.0985915 |
| every_night | 5 | 30 | 224 | 254 | 0.1181102 |
Call:
glm(formula = yes/n ~ x, family = binomial(link = logit), data = df.heart,
weights = n)
Deviance Residuals:
1 2 3 4
-0.8346 1.2521 0.2758 -0.6845
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -3.86625 0.16621 -23.261 < 0.0000000000000002 ***
x 0.39734 0.05001 7.945 0.00000000000000194 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 65.9045 on 3 degrees of freedom
Residual deviance: 2.8089 on 2 degrees of freedom
AIC: 27.061
Number of Fisher Scoring iterations: 4
1 2 3 4
0.02050742 0.04429511 0.09305411 0.13243885
fit2 <- glm(yes/n ~ x, family = quasi(link = identity, variance = "mu(1-mu)"),
weights = n, data = df.heart)
summary(fit2, dispersion = 1)
Call:
glm(formula = yes/n ~ x, family = quasi(link = identity, variance = "mu(1-mu)"),
data = df.heart, weights = n)
Deviance Residuals:
1 2 3 4
0.04478 -0.21322 0.11010 0.09798
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 0.017247 0.003451 4.998 0.00000058029057 ***
x 0.019778 0.002805 7.051 0.00000000000177 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for quasi family taken to be 1)
Null deviance: 65.904481 on 3 degrees of freedom
Residual deviance: 0.069191 on 2 degrees of freedom
AIC: NA
Number of Fisher Scoring iterations: 3
binomial.logit.fit <- function(x, a, b) exp(a + b * x)/(1 + exp(a + b * x))
binomial.identity.fit <- function(x, a, b) a + b * x
xx <- seq(0.0001, 5, length = 1000)
yy1 <- binomial.logit.fit(xx, coefficients(fit1)[1], coefficients(fit1)[2])
yy2 <- binomial.identity.fit(xx, coefficients(fit2)[1], coefficients(fit2)[2])
xrange <- range(xx)
yrange <- range(0, 0.2)
plot(xx, yy1, type = "l", lwd = 3, xlim = xrange, ylim = yrange, xlab = "",
ylab = "")
par(new = T)
plot(xx, yy2, type = "l", lty = 4, lwd = 3, xlim = xrange, ylim = yrange, xlab = "x (snoring level)",
ylab = "probability", col = "purple")
par(new = T)
plot(df.heart$x, df.heart$pctyes, cex = 2, pch = 19, xlim = xrange, ylim = yrange,
xlab = "", ylab = "", col = "darkgreen")
legend("topleft", legend = c("Logistic Fit", "Linear Fit"), lty = c(1, 4), lwd = 3,
col = c("black", "purple"))df.heart2 <- read.table("/Users/Patrick/Dropbox/data/agresti/Heart2.dat", header = T)
head(df.heart2) subject snoring x y
1 1 never 0 1
2 2 never 0 1
3 3 never 0 1
4 4 never 0 1
5 5 never 0 1
6 6 never 0 1
# Dobson and Barnett Poisson data analysis
x <- c(rep(-1, 2), rep(0, 4), rep(1, 3))
y <- c(2, 3, 6, 7, 8, 9, 10, 12, 15)
DB <- data.frame(x, y)
kable(DB)| x | y |
|---|---|
| -1 | 2 |
| -1 | 3 |
| 0 | 6 |
| 0 | 7 |
| 0 | 8 |
| 0 | 9 |
| 1 | 10 |
| 1 | 12 |
| 1 | 15 |
Call:
glm(formula = y ~ x, family = poisson(link = identity), data = DB)
Deviance Residuals:
Min 1Q Median 3Q Max
-0.7019 -0.3377 -0.1105 0.2958 0.7184
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 7.4516 0.8841 8.428 < 0.0000000000000002 ***
x 4.9353 1.0892 4.531 0.00000586 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for poisson family taken to be 1)
Null deviance: 18.4206 on 8 degrees of freedom
Residual deviance: 1.8947 on 7 degrees of freedom
AIC: 40.008
Number of Fisher Scoring iterations: 3
(Intercept)
-2.418969
Call:
glm(formula = y ~ x, family = poisson(link = log), data = DB)
Deviance Residuals:
Min 1Q Median 3Q Max
-0.8472 -0.2601 -0.2137 0.5214 0.8788
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 1.8893 0.1421 13.294 < 0.0000000000000002 ***
x 0.6698 0.1787 3.748 0.000178 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for poisson family taken to be 1)
Null deviance: 18.4206 on 8 degrees of freedom
Residual deviance: 2.9387 on 7 degrees of freedom
AIC: 41.052
Number of Fisher Scoring iterations: 4
# predict response at x = -2 using LOG link
exp(coefficients(fit2)[1] + coefficients(fit2)[2] * (-2))(Intercept)
1.732734
# Agresti horseshoe crabs pp.73-76
df.horsecrab <- read.table("/Users/Patrick/Dropbox/data/agresti/Crabs.dat",
header = T)
summary(df.horsecrab) crab sat y weight
Min. : 1 Min. : 0.000 Min. :0.0000 Min. :1.200
1st Qu.: 44 1st Qu.: 0.000 1st Qu.:0.0000 1st Qu.:2.000
Median : 87 Median : 2.000 Median :1.0000 Median :2.350
Mean : 87 Mean : 2.919 Mean :0.6416 Mean :2.437
3rd Qu.:130 3rd Qu.: 5.000 3rd Qu.:1.0000 3rd Qu.:2.850
Max. :173 Max. :15.000 Max. :1.0000 Max. :5.200
width color spine
Min. :21.0 Min. :1.000 Min. :1.000
1st Qu.:24.9 1st Qu.:2.000 1st Qu.:2.000
Median :26.1 Median :2.000 Median :3.000
Mean :26.3 Mean :2.439 Mean :2.486
3rd Qu.:27.7 3rd Qu.:3.000 3rd Qu.:3.000
Max. :33.5 Max. :4.000 Max. :3.000
Success
Satellite Count 0 1
0 62 0
1 0 16
2 0 9
3 0 19
4 0 19
5 0 15
6 0 13
7 0 4
8 0 6
9 0 3
10 0 3
11 0 1
12 0 1
14 0 1
15 0 1
xx <- seq(21, 33.5, length = 1000)
xrange <- range(xx)
yrange <- range(df.horsecrab$sat)
plot(sat ~ width, xlab = "Width", ylab = "Number of satellites", xlim = xrange,
ylim = yrange, col = "darkgreen", cex = 1.3, data = df.horsecrab)
fit <- glm(sat ~ width, family = poisson(link = log), data = df.horsecrab)
summary(fit)
Call:
glm(formula = sat ~ width, family = poisson(link = log), data = df.horsecrab)
Deviance Residuals:
Min 1Q Median 3Q Max
-2.8526 -1.9884 -0.4933 1.0970 4.9221
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -3.30476 0.54224 -6.095 0.0000000011 ***
width 0.16405 0.01997 8.216 < 0.0000000000000002 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for poisson family taken to be 1)
Null deviance: 632.79 on 172 degrees of freedom
Residual deviance: 567.88 on 171 degrees of freedom
AIC: 927.18
Number of Fisher Scoring iterations: 6
yy <- exp(coefficients(fit)[1] + coefficients(fit)[2] * xx)
par(new = T)
plot(xx, yy, type = "l", lwd = 3, xlab = "", ylab = "", xlim = xrange, ylim = yrange,
col = "lightblue")gam.fit <- gam(sat ~ s(width), family = poisson, data = df.horsecrab)
# curve(predict(gam.fit, data.frame(width = x), type = 'resp'),col =
# 'purple', lty = 4, lwd = 3, add = T) legend('topleft', legend =
# c('Loglinear Fit','GAM Fit'), lty = c(1, 4), lwd = 3, col = c('lightblue',
# 'purple'))
# Political Ideology and Evolution pp.78-79
EVO <- read.table("/Users/Patrick/Dropbox/data/agresti/Evolution.dat", header = T)
attach(EVO)
EVO ideology true false
1 1 11 37
2 2 46 104
3 3 70 72
4 4 241 214
5 5 78 36
6 6 89 24
7 7 36 6
EVO$n <- EVO$true + EVO$false
fit <- glm(true/n ~ ideology, family = binomial, weights = n, data = EVO)
summary(fit)
Call:
glm(formula = true/n ~ ideology, family = binomial, data = EVO,
weights = n)
Deviance Residuals:
1 2 3 4 5 6 7
0.1430 -0.2697 1.4614 -1.0791 0.2922 0.4471 0.2035
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -1.75658 0.20500 -8.569 <0.0000000000000002 ***
ideology 0.49422 0.05092 9.706 <0.0000000000000002 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 113.20 on 6 degrees of freedom
Residual deviance: 3.72 on 5 degrees of freedom
AIC: 42.332
Number of Fisher Scoring iterations: 3
2.5 % 97.5 %
0.3961660 0.5959414
Analysis of Deviance Table (Type II tests)
Response: true/n
LR Chisq Df Pr(>Chisq)
ideology 109.48 1 < 0.00000000000000022 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
fit0 <- glm(true/n ~ 1, family = binomial, weights = n, data = EVO)
glm.scoretest(fit0, EVO$ideology)^2[1] 104.101
ideology true false
1 1 11 37 48 0.2291667 0.2205679 0.1611162
2 2 46 104 150 0.3066667 0.3168813 -0.3515386
3 3 70 72 142 0.4929577 0.4319445 1.6480176
4 4 241 214 455 0.5296703 0.5548525 -1.4995488
5 5 78 36 114 0.6842105 0.6713982 0.3248519
6 6 89 24 113 0.7876106 0.7700750 0.5413625
7 7 36 6 42 0.8571429 0.8459201 0.2206605
# Horseshoe crabs: original/ungrouped data
df.horsecrab <- read.table("/Users/Patrick/Dropbox/data/agresti/Crabs.dat",
header = TRUE)
table(df.horsecrab$sat, df.horsecrab$y, dnn = c("Sattelite Count", "Success")) Success
Sattelite Count 0 1
0 62 0
1 0 16
2 0 9
3 0 19
4 0 19
5 0 15
6 0 13
7 0 4
8 0 6
9 0 3
10 0 3
11 0 1
12 0 1
14 0 1
15 0 1
# Binary/Binomial (log-link) logistic fit p.92
fit <- glm(y ~ width, family = binomial, data = df.horsecrab)
summary(fit)
Call:
glm(formula = y ~ width, family = binomial, data = df.horsecrab)
Deviance Residuals:
Min 1Q Median 3Q Max
-2.0281 -1.0458 0.5480 0.9066 1.6942
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -12.3508 2.6287 -4.698 0.00000262 ***
width 0.4972 0.1017 4.887 0.00000102 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 225.76 on 172 degrees of freedom
Residual deviance: 194.45 on 171 degrees of freedom
AIC: 198.45
Number of Fisher Scoring iterations: 4
# Plots pg. 92
plot(jitter(y, 0.08) ~ width, pch = 19, col = "purple", xlab = "Width in cm",
ylab = "At least one satellite", data = df.horsecrab)
gam.fit <- gam(y ~ (width), family = binomial, data = df.horsecrab)
curve(predict(gam.fit, data.frame(width = x), type = "resp"), col = "orange",
lty = 4, lwd = 3, add = TRUE)
curve(predict(fit, data.frame(width = x), type = "resp"), col = "darkgreen",
lty = 2, lwd = 3, add = TRUE)
legend("bottomright", legend = c("Logistic Fit", "GAM Fit"), lty = c(2, 4),
lwd = 3, col = c("darkgreen", "orange"))# Predictions p.92 Estimated Probability of Satellite at width = 21.0
predict(fit, data.frame(width = 21), type = "response") 1
0.129096
# Estimated Probability of Satellite at width = 33.5
predict(fit, data.frame(width = 33.5), type = "response") 1
0.9866974
# Estimated Probability of Satellite at mean width
pimean <- predict(fit, data.frame(width = mean(df.horsecrab$width)), type = "response")
pimean 1
0.6738768
# Estimated Probability of Satellite at mean width + unit increase
pimean1 <- predict(fit, data.frame(width = mean(df.horsecrab$width) + 1), type = "response")
pimean1 1
0.7725915
1
2.066325
1
3.397373
1
1.644162
width
1.644162
# LD50 or Point estimate of Median Effective Level (MEL = LD50/ED50/EC50)
MEL <- (-coefficients(fit)[1]/coefficients(fit)[2])
MEL(Intercept)
24.83922
width
23.88748
width
0.00000102134
Analysis of Deviance Table (Type II tests)
Response: y
LR Chisq Df Pr(>Chisq)
width 31.306 1 0.00000002204 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
[1] 0.2978326 0.6966286
2.5 % 97.5 %
0.3083806 0.7090167
# WCI and PLCI for OR p.95
exp(coefficients(fit)[2] + c(-1, 1) * qnorm(0.975) * sqrt(diag(vcov(fit)))[2])[1] 1.346936 2.006975
[1] 1.346936 2.006975
2.5 % 97.5 %
1.361219 2.031992
# Predicted probabilities for fitted values pp.96-98
pred.prob <- fitted(fit)
Linpred <- predict(fit, se.fit = T)
Linpred.CIL <- Linpred$fit - qnorm(0.975) * Linpred$se.fit
Linpred.CIU <- Linpred$fit + qnorm(0.975) * Linpred$se.fit
pred.prob.CIL <- exp(Linpred.CIL)/(1 + exp(Linpred.CIL))
pred.prob.CIU <- exp(Linpred.CIU)/(1 + exp(Linpred.CIU))
crabs.probs <- cbind(df.horsecrab$width, pred.prob, pred.prob.CIL, pred.prob.CIU)
head(crabs.probs, 7) pred.prob pred.prob.CIL pred.prob.CIU
1 28.3 0.8482329 0.7528521 0.9111481
2 22.5 0.2380991 0.1299857 0.3952793
3 26.0 0.6404177 0.5580894 0.7152343
4 24.8 0.4951254 0.3982566 0.5923614
5 26.0 0.6404177 0.5580894 0.7152343
6 23.8 0.3736172 0.2613945 0.5013184
7 26.5 0.6954646 0.6120544 0.7677464
# Plot jittered data, fitted logistic, with confidence bands p.97
plot(jitter(y, 0.1) ~ width, pch = 19, col = "purple", xlim = c(18, 34), xlab = "Width in cm",
ylab = "At least one satellite", data = df.horsecrab)
data.plot <- data.frame(width = (18:34))
Linpred2 <- predict(fit, newdata = data.plot, se.fit = T)
pred.prob2 <- (exp(Linpred2$fit)/(1 + exp(Linpred2$fit)))
LB <- Linpred2$fit - qnorm(0.975) * Linpred2$se.fit
UB <- Linpred2$fit + qnorm(0.975) * Linpred2$se.fit
LB.p <- exp(LB)/(1 + exp(LB))
UB.p <- exp(UB)/(1 + exp(UB))
lines(18:34, pred.prob2, lwd = 3, col = "darkgreen")
lines(18:34, LB.p, lwd = 3, lty = 4, col = "orange")
lines(18:34, UB.p, lwd = 3, lty = 4, col = "orange")# HSCrabs with nominal Color and quant Width as predictors pp. 102-104 Color
# is nominal with 1 = medium light, 2 = medium, 3 = medium dark, 4 = dark
table(df.horsecrab$color)
1 2 3 4
12 95 44 22
Call:
glm(formula = y ~ width + factor(color), family = binomial, data = df.horsecrab)
Deviance Residuals:
Min 1Q Median 3Q Max
-2.1124 -0.9848 0.5243 0.8513 2.1413
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -11.38519 2.87346 -3.962 0.00007426 ***
width 0.46796 0.10554 4.434 0.00000926 ***
factor(color)2 0.07242 0.73989 0.098 0.922
factor(color)3 -0.22380 0.77708 -0.288 0.773
factor(color)4 -1.32992 0.85252 -1.560 0.119
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 225.76 on 172 degrees of freedom
Residual deviance: 187.46 on 168 degrees of freedom
AIC: 197.46
Number of Fisher Scoring iterations: 4
bhat <- coefficients(fit2)[2]
a1hat <- coefficients(fit2)[1]
a2hat <- a1hat + coefficients(fit2)[3]
a3hat <- a1hat + coefficients(fit2)[4]
a4hat <- a1hat + coefficients(fit2)[5]
ORwidth <- exp(bhat)
ORwidth width
1.596727
(Intercept)
3.780738
# Plot on p.103
xx <- seq(18, 34, length = 1000)
y1 <- binomial.logit.fit(xx, a1hat, bhat)
y2 <- binomial.logit.fit(xx, a2hat, bhat)
y3 <- binomial.logit.fit(xx, a3hat, bhat)
y4 <- binomial.logit.fit(xx, a4hat, bhat)
xrange <- range(xx)
yrange <- range(0, 1)
plot(xx, y1, type = "l", lwd = 3, xlim = xrange, ylim = yrange, col = "orange",
xlab = "Width in cm", ylab = "Predicted Probability")
par(new = T)
plot(xx, y2, type = "l", lwd = 3, xlim = xrange, ylim = yrange, lty = 2, col = "darkgreen",
xlab = "", ylab = "")
par(new = T)
plot(xx, y3, type = "l", lwd = 3, xlim = xrange, ylim = yrange, lty = 3, col = "darkblue",
xlab = "", ylab = "")
par(new = T)
plot(xx, y4, type = "l", lwd = 3, xlim = xrange, ylim = yrange, lty = 4, xlab = "",
ylab = "")
title("Horseshoe Crabs: Logistic Predicted Curves by Color")# Testing to drop Nominal Color variable p.104 Recall the following:
fit <- glm(y ~ width, family = binomial, data = df.horsecrab)
summary(fit)
Call:
glm(formula = y ~ width, family = binomial, data = df.horsecrab)
Deviance Residuals:
Min 1Q Median 3Q Max
-2.0281 -1.0458 0.5480 0.9066 1.6942
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -12.3508 2.6287 -4.698 0.00000262 ***
width 0.4972 0.1017 4.887 0.00000102 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 225.76 on 172 degrees of freedom
Residual deviance: 194.45 on 171 degrees of freedom
AIC: 198.45
Number of Fisher Scoring iterations: 4
Analysis of Deviance Table (Type II tests)
Response: y
LR Chisq Df Pr(>Chisq)
width 24.6038 1 0.0000007041 ***
factor(color) 6.9956 3 0.07204 .
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
# For Width, Full Resid Dev = 187.46, Reduced Resid Dev = 194.45, Diff =
# 6.99 Treating Color as Quantitative, p.105
fit3 <- glm(y ~ width + color, family = binomial, data = df.horsecrab)
summary(fit3)
Call:
glm(formula = y ~ width + color, family = binomial, data = df.horsecrab)
Deviance Residuals:
Min 1Q Median 3Q Max
-2.1692 -0.9889 0.5429 0.8700 1.9742
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -10.0708 2.8068 -3.588 0.000333 ***
width 0.4583 0.1040 4.406 0.0000105 ***
color -0.5090 0.2237 -2.276 0.022860 *
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 225.76 on 172 degrees of freedom
Residual deviance: 189.12 on 170 degrees of freedom
AIC: 195.12
Number of Fisher Scoring iterations: 4
color
0.6010683
color
0.2171558
Analysis of Deviance Table
Model 1: y ~ width + color
Model 2: y ~ width + factor(color)
Resid. Df Resid. Dev Df Deviance Pr(>Chi)
1 170 189.12
2 168 187.46 2 1.6641 0.4351
# Discretizing Color with Dummy for Dark color, pp.105-6
df.horsecrab$c4 <- ifelse(df.horsecrab$color == 4, 1, 0)
table(df.horsecrab$c4)
0 1
151 22
Call:
glm(formula = y ~ width + c4, family = binomial, data = df.horsecrab)
Deviance Residuals:
Min 1Q Median 3Q Max
-2.0821 -0.9932 0.5274 0.8606 2.1553
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -11.6790 2.6925 -4.338 0.00001440 ***
width 0.4782 0.1041 4.592 0.00000439 ***
c4 -1.3005 0.5259 -2.473 0.0134 *
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 225.76 on 172 degrees of freedom
Residual deviance: 187.96 on 170 degrees of freedom
AIC: 193.96
Number of Fisher Scoring iterations: 4
c4
0.2723923
Analysis of Deviance Table
Model 1: y ~ width + c4
Model 2: y ~ width + factor(color)
Resid. Df Resid. Dev Df Deviance Pr(>Chi)
1 170 187.96
2 168 187.46 2 0.50085 0.7785
# GOF - Testing for Interaction in Last Model Fit, pp.106-7
fit5 <- glm(y ~ width + c4 + width * c4, family = binomial, data = df.horsecrab)
summary(fit5)
Call:
glm(formula = y ~ width + c4 + width * c4, family = binomial,
data = df.horsecrab)
Deviance Residuals:
Min 1Q Median 3Q Max
-2.1366 -0.9344 0.4996 0.8554 1.7753
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -12.8117 2.9576 -4.332 0.00001479 ***
width 0.5222 0.1146 4.556 0.00000521 ***
c4 6.9578 7.3182 0.951 0.342
width:c4 -0.3217 0.2857 -1.126 0.260
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 225.76 on 172 degrees of freedom
Residual deviance: 186.79 on 169 degrees of freedom
AIC: 194.79
Number of Fisher Scoring iterations: 4
# Plot for Interaction, pp.106-7
a1hatL <- coefficients(fit5)[1]
bhatL <- coefficients(fit5)[2]
a1hatD <- a1hatL + coefficients(fit5)[3]
bhatD <- bhatL + coefficients(fit5)[4]
xx <- seq(18, 34, length = 1000)
yL <- binomial.logit.fit(xx, a1hatL, bhatL)
yD <- binomial.logit.fit(xx, a1hatD, bhatD)
xrange <- range(xx)
yrange <- range(0, 1)
plot(xx, yL, type = "l", lwd = 3, xlim = xrange, ylim = yrange, col = "orange",
xlab = "Width in cm", ylab = "Predicted Probability")
par(new = T)
plot(xx, yD, type = "l", lwd = 3, xlim = xrange, ylim = yrange, lty = 2, xlab = "",
ylab = "")
legend("topleft", legend = c("Lighter Crabs", "Dark Crabs"), lty = c(1, 2),
lwd = 3, col = c("orange", "black"))
title("Horseshoe Crabs: Logistic Predicted Curves and Binary Dark Color")Analysis of Deviance Table
Model 1: y ~ width + c4 + width * c4
Model 2: y ~ width + c4
Resid. Df Resid. Dev Df Deviance Pr(>Chi)
1 169 186.79
2 170 187.96 -1 -1.1715 0.2791
# Probability-Based Interpretations, pp.107-8
predict(fit4, data.frame(c4 = 1, width = mean(df.horsecrab$width)), type = "response") 1
0.4006293
1
0.7104701
predict(fit4, data.frame(c4 = mean(df.horsecrab$c4), width = quantile(df.horsecrab$width)),
type = "response") 0% 25% 50% 75% 100%
0.1416394 0.5158264 0.6541188 0.8025564 0.9848731
[1] 26.29884
[1] 2.109061
[1] 2.439306
[1] 0.8019334
Call:
logitmfx(formula = fit4, data = df.horsecrab, atmean = F)
Marginal Effects:
dF/dx Std. Err. z P>|z|
width 0.087483 0.024472 3.5748 0.0003504 ***
c4 -0.261420 0.105690 -2.4735 0.0133809 *
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
dF/dx is for discrete change for the following variables:
[1] "c4"
[1] 0.6416185
predicted
0 1
79 94
0 1
62 111
predicted
df.horsecrab$y 0 1
0 43 19
1 36 75
predicted
df.horsecrab$y 0 1
0 31 31
1 15 96
# ROC Curves
rocplot2 <- roc(y ~ fitted(fit2), data = df.horsecrab)
plot.roc(rocplot2, legacy.axes = T, col = "purple", lwd = 3, lty = 1)
auc(rocplot2)Area under the curve: 0.7714
rocplot3 <- roc(y ~ fitted(fit3), data = df.horsecrab)
par(new = T)
plot.roc(rocplot3, legacy.axes = T, col = "orange", lwd = 3, lty = 2)
auc(rocplot3)Area under the curve: 0.7622
rocplot4 <- roc(y ~ fitted(fit4), data = df.horsecrab)
par(new = T)
plot.roc(rocplot4, legacy.axes = T, col = "red", lwd = 3, lty = 3)Area under the curve: 0.772
[1] 0.4522131
[1] 0.4446419
[1] 0.4469688
# Case control p.93 ref to p.35
smokeryes <- as.factor(c(1, 0))
responseCC <- cbind(yes = c(688, 21), no = c(650, 59))
responseCC yes no
[1,] 688 650
[2,] 21 59
Call:
glm(formula = responseCC ~ smokeryes, family = binomial)
Deviance Residuals:
[1] 0 0
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -1.0330 0.2541 -4.065 0.0000480 ***
smokeryes1 1.0898 0.2599 4.193 0.0000275 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 19.878015956758041227 on 1 degrees of freedom
Residual deviance: 0.000000000000026201 on 0 degrees of freedom
AIC: 16.237
Number of Fisher Scoring iterations: 3
[1] 0.5803911 1.5992719
[1] 1.786737 4.949427
$data
yes no Total
row1 688 650 1338
row2 21 59 80
Total 709 709 1418
$measure
NA
odds ratio with 95% C.I. estimate lower upper
[1,] 1.000000 NA NA
[2,] 2.973773 1.786737 4.949427
$p.value
NA
two-sided midp.exact fisher.exact chi.square
[1,] NA NA NA
[2,] 0.000009747013 0.00001476303 0.00001221601
$correction
[1] FALSE
attr(,"method")
[1] "Unconditional MLE & normal approximation (Wald) CI"
data:
95 percent confidence interval:
1.794500 4.928018
2.5 % 97.5 %
1.81602 5.05732
# Survey about Marijuana Use pp.98-100
Marijuana <- read.table("/Users/Patrick/Dropbox/data/agresti/Marijuana.dat",
header = T)
Marijuana race gender yes no
1 white female 420 620
2 white male 483 579
3 other female 25 55
4 other male 32 62
fitM <- glm(yes/(yes + no) ~ gender + race, weights = yes + no, family = binomial,
data = Marijuana)
summary(fitM)
Call:
glm(formula = yes/(yes + no) ~ gender + race, family = binomial,
data = Marijuana, weights = yes + no)
Deviance Residuals:
1 2 3 4
-0.04513 0.04402 0.17321 -0.15493
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -0.83035 0.16854 -4.927 0.000000837 ***
gendermale 0.20261 0.08519 2.378 0.01739 *
racewhite 0.44374 0.16766 2.647 0.00813 **
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 12.752784 on 3 degrees of freedom
Residual deviance: 0.057982 on 1 degrees of freedom
AIC: 30.414
Number of Fisher Scoring iterations: 3
Analysis of Deviance Table (Type II tests)
Response: yes/(yes + no)
LR Chisq Df Pr(>Chisq)
gender 5.6662 1 0.017295 *
race 7.2770 1 0.006984 **
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Marijuana$Dmale <- c(0, 1, 0, 1)
Marijuana$Dwhite <- c(1, 1, 0, 0)
fitM2 <- glm(yes/(yes + no) ~ Dmale + Dwhite, weights = yes + no, family = binomial,
data = Marijuana)
summary(fitM2)
Call:
glm(formula = yes/(yes + no) ~ Dmale + Dwhite, family = binomial,
data = Marijuana, weights = yes + no)
Deviance Residuals:
1 2 3 4
-0.04513 0.04402 0.17321 -0.15493
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -0.83035 0.16854 -4.927 0.000000837 ***
Dmale 0.20261 0.08519 2.378 0.01739 *
Dwhite 0.44374 0.16766 2.647 0.00813 **
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 12.752784 on 3 degrees of freedom
Residual deviance: 0.057982 on 1 degrees of freedom
AIC: 30.414
Number of Fisher Scoring iterations: 3
#################################################################### Additional Material Follows: ECMO versus CMT
cmtDummy <- as.factor(c(1, 0))
responseECMO <- cbind(survived = c(18, 19), died = c(2, 11))
responseECMO survived died
[1,] 18 2
[2,] 19 11
Call:
glm(formula = responseECMO ~ cmtDummy, family = binomial)
Deviance Residuals:
[1] 0 0
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 0.5465 0.3789 1.443 0.1491
cmtDummy1 1.6507 0.8361 1.974 0.0484 *
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 4.8729070876436795245 on 1 degrees of freedom
Residual deviance: 0.0000000000000011102 on 0 degrees of freedom
AIC: 10.307
Number of Fisher Scoring iterations: 4
[1] 0.01191629 3.28944545
[1] 1.011988 26.827982
$data
survived died Total
row1 18 2 20
row2 19 11 30
Total 37 13 50
$measure
NA
odds ratio with 95% C.I. estimate lower upper
[1,] 1.000000 NA NA
[2,] 5.210526 1.011988 26.82798
$p.value
NA
two-sided midp.exact fisher.exact chi.square
[1,] NA NA NA
[2,] 0.03967315 0.0497626 0.035205
$correction
[1] FALSE
attr(,"method")
[1] "Unconditional MLE & normal approximation (Wald) CI"
data:
95 percent confidence interval:
1.093194 23.909528
cmtDummy1
5.210526
2.5 % 97.5 %
1.187554 36.781032
# Wald test
WTS <- (coefficients(fit2)[2]/sqrt(diag(vcov(fit2)))[2])^2
Wpvalue <- 1 - pchisq(WTS, 1)
WTScmtDummy1
3.897528
cmtDummy1
0.0483572
Analysis of Deviance Table (Type II tests)
Response: responseECMO
LR Chisq Df Pr(>Chisq)
cmtDummy 4.8729 1 0.02728 *
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
# My made up logistic example
pow <- 0:4
dose <- 2^pow
n <- c(8, 10, 9, 12, 15)
y <- c(1, 2, 4, 8, 13)
pct <- y/n
madeup <- data.frame(dose, n, y, pct)
madeup dose n y pct
1 1 8 1 0.1250000
2 2 10 2 0.2000000
3 4 9 4 0.4444444
4 8 12 8 0.6666667
5 16 15 13 0.8666667
Call:
glm(formula = y/n ~ dose, family = binomial, data = madeup, weights = n)
Deviance Residuals:
1 2 3 4 5
-0.6291 -0.3935 0.5661 0.5728 -0.4852
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -1.56166 0.52705 -2.963 0.003046 **
dose 0.23874 0.06871 3.475 0.000512 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 19.3276 on 4 degrees of freedom
Residual deviance: 1.4347 on 3 degrees of freedom
AIC: 17.731
Number of Fisher Scoring iterations: 4
xx <- seq(0, 16, length = 1000)
yy <- binomial.logit.fit(xx, coefficients(fitt)[1], coefficients(fitt)[2])
xrange <- range(xx)
yrange <- range(0, 1)
plot(xx, yy, type = "l", lwd = 3, xlim = xrange, ylim = yrange, xlab = "dose in mg",
ylab = "percent dead")
par(new = T)
plot(madeup$dose, madeup$pct, cex = 2, pch = 20, col = "darkgreen", xlim = xrange,
ylim = yrange, xlab = "", ylab = "")
yy2 <- binomial.LL.fit(xx, 1.4421, 4.7063)
par(new = T)
plot(xx, yy2, type = "l", lwd = 3, lty = 3, col = "purple", xlim = xrange, ylim = yrange,
xlab = "", ylab = "")
legend("topleft", lwd = 3, lty = c(1, 3), c("black", "purple"), legend = c("On dose scale",
"On log-dose scale"))# Horseshoe crabs 2: grouped data
widthx <- c(22.69, 23.84, 24.77, 25.84, 26.79, 27.74, 28.67, 30.41)
widthy <- c(5, 4, 17, 21, 15, 20, 15, 14)
widthn <- c(14, 14, 28, 39, 22, 24, 18, 14)
widthpct <- widthy/widthn
crabs3 <- data.frame(widthx, widthy, widthn, widthpct)
crabs3 widthx widthy widthn widthpct
1 22.69 5 14 0.3571429
2 23.84 4 14 0.2857143
3 24.77 17 28 0.6071429
4 25.84 21 39 0.5384615
5 26.79 15 22 0.6818182
6 27.74 20 24 0.8333333
7 28.67 15 18 0.8333333
8 30.41 14 14 1.0000000
fit3 <- glm(widthy/widthn ~ widthx, family = binomial, weight = widthn, data = crabs3)
summary(fit3)
Call:
glm(formula = widthy/widthn ~ widthx, family = binomial, data = crabs3,
weights = widthn)
Deviance Residuals:
Min 1Q Median 3Q Max
-1.04867 -0.48888 0.06475 0.79123 1.40490
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -11.51402 2.54890 -4.517 0.00000626 ***
widthx 0.46468 0.09855 4.715 0.00000241 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 34.0340 on 7 degrees of freedom
Residual deviance: 5.9696 on 6 degrees of freedom
AIC: 33.151
Number of Fisher Scoring iterations: 4
(Intercept)
-11.51402
xx <- seq(22, 31, length = 1000)
yy <- binomial.logit.fit(xx, coefficients(fit3)[1], coefficients(fit3)[2])
xrange <- range(xx)
yrange <- range(0, 1)
plot(xx, yy, type = "l", lwd = 3, xlim = xrange, ylim = yrange, xlab = "Width in cm",
ylab = "At least one satellite")
par(new = T)
plot(crabs3$widthx, crabs3$widthpct, cex = 1.5, pch = 20, xlim = xrange, ylim = yrange,
xlab = "", ylab = "", col = "red")[1] 0.2747837 0.3926692 0.4990110 0.6208716 0.7180265 0.7983699 0.8591547
[8] 0.9319367
# 0.2748891 0.3928013 0.4991548 0.6210125 0.7181519 0.7984730 0.8592348
# 0.9319811
sum(crabs3$widthn)[1] 173
[1] 3.846972 5.497369 13.972309 24.213992 15.796582 19.160877 15.464785
[8] 13.047114
[1] 5 4 17 21 15 20 15 14
# Horseshoe crabs 1 - this is original/actual (ungrouped) data
crabs <- read.table("/Users/Patrick/Dropbox/data/agresti/Crabs.dat", header = T)
table(crabs$y)
0 1
62 111
# Binary/Binomial (log-link) logistic fit p.92
fit <- glm(y ~ weight + width + factor(color) + factor(spine), family = binomial,
data = crabs)
summary(fit)
Call:
glm(formula = y ~ weight + width + factor(color) + factor(spine),
family = binomial, data = crabs)
Deviance Residuals:
Min 1Q Median 3Q Max
-2.1977 -0.9424 0.4849 0.8491 2.1198
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -8.06501 3.92855 -2.053 0.0401 *
weight 0.82578 0.70383 1.173 0.2407
width 0.26313 0.19530 1.347 0.1779
factor(color)2 -0.10290 0.78259 -0.131 0.8954
factor(color)3 -0.48886 0.85312 -0.573 0.5666
factor(color)4 -1.60867 0.93553 -1.720 0.0855 .
factor(spine)2 -0.09598 0.70337 -0.136 0.8915
factor(spine)3 0.40029 0.50270 0.796 0.4259
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 225.76 on 172 degrees of freedom
Residual deviance: 185.20 on 165 degrees of freedom
AIC: 201.2
Number of Fisher Scoring iterations: 4
[1] 0.0000009832923
Analysis of Deviance Table (Type II tests)
Response: y
LR Chisq Df Pr(>Chisq)
weight 1.4099 1 0.23507
width 1.7968 1 0.18010
factor(color) 7.5958 3 0.05515 .
factor(spine) 1.0091 2 0.60377
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot(crabs$weight, crabs$width, pch = 19, cex = 1.5, xlab = "HS Crab Weight in kg",
ylab = "Shell Width in cm", col = "purple")[1] 0.8868715
# 5.1.4 Purposeful Selection of Explanatory Variables
fitc <- glm(y ~ factor(color), family = binomial, data = crabs)
summary(fitc)
Call:
glm(formula = y ~ factor(color), family = binomial, data = crabs)
Deviance Residuals:
Min 1Q Median 3Q Max
-1.6651 -1.3370 0.7997 0.7997 1.5134
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 1.0986 0.6667 1.648 0.0994 .
factor(color)2 -0.1226 0.7053 -0.174 0.8620
factor(color)3 -0.7309 0.7338 -0.996 0.3192
factor(color)4 -1.8608 0.8087 -2.301 0.0214 *
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 225.76 on 172 degrees of freedom
Residual deviance: 212.06 on 169 degrees of freedom
AIC: 220.06
Number of Fisher Scoring iterations: 4
Call:
glm(formula = y ~ factor(spine), family = binomial, data = crabs)
Deviance Residuals:
Min 1Q Median 3Q Max
-1.5576 -1.4385 0.8400 0.9371 1.2346
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 0.8602 0.3597 2.392 0.0168 *
factor(spine)2 -0.9937 0.6303 -1.577 0.1149
factor(spine)3 -0.2647 0.4068 -0.651 0.5152
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 225.76 on 172 degrees of freedom
Residual deviance: 223.23 on 170 degrees of freedom
AIC: 229.23
Number of Fisher Scoring iterations: 4
Call:
glm(formula = y ~ width, family = binomial, data = crabs)
Deviance Residuals:
Min 1Q Median 3Q Max
-2.0281 -1.0458 0.5480 0.9066 1.6942
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -12.3508 2.6287 -4.698 0.00000262 ***
width 0.4972 0.1017 4.887 0.00000102 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 225.76 on 172 degrees of freedom
Residual deviance: 194.45 on 171 degrees of freedom
AIC: 198.45
Number of Fisher Scoring iterations: 4
Call:
glm(formula = y ~ width + factor(color), family = binomial, data = crabs)
Deviance Residuals:
Min 1Q Median 3Q Max
-2.1124 -0.9848 0.5243 0.8513 2.1413
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -11.38519 2.87346 -3.962 0.00007426 ***
width 0.46796 0.10554 4.434 0.00000926 ***
factor(color)2 0.07242 0.73989 0.098 0.922
factor(color)3 -0.22380 0.77708 -0.288 0.773
factor(color)4 -1.32992 0.85252 -1.560 0.119
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 225.76 on 172 degrees of freedom
Residual deviance: 187.46 on 168 degrees of freedom
AIC: 197.46
Number of Fisher Scoring iterations: 4
Analysis of Deviance Table (Type II tests)
Response: y
LR Chisq Df Pr(>Chisq)
width 24.6038 1 0.0000007041 ***
factor(color) 6.9956 3 0.07204 .
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
fitcws <- glm(y ~ width + factor(color) + factor(spine), family = binomial,
data = crabs)
summary(fitcws)
Call:
glm(formula = y ~ width + factor(color) + factor(spine), family = binomial,
data = crabs)
Deviance Residuals:
Min 1Q Median 3Q Max
-2.1206 -0.9724 0.5076 0.8750 2.1158
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -11.09953 2.97706 -3.728 0.000193 ***
width 0.45624 0.10779 4.233 0.0000231 ***
factor(color)2 -0.14340 0.77838 -0.184 0.853830
factor(color)3 -0.52405 0.84685 -0.619 0.536030
factor(color)4 -1.66833 0.93285 -1.788 0.073706 .
factor(spine)2 -0.05782 0.70308 -0.082 0.934453
factor(spine)3 0.37703 0.50191 0.751 0.452540
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 225.76 on 172 degrees of freedom
Residual deviance: 186.61 on 166 degrees of freedom
AIC: 200.61
Number of Fisher Scoring iterations: 4
fitcwint <- glm(y ~ width + factor(color) + width * factor(color), family = binomial,
data = crabs)
summary(fitcwint)
Call:
glm(formula = y ~ width + factor(color) + width * factor(color),
family = binomial, data = crabs)
Deviance Residuals:
Min 1Q Median 3Q Max
-2.0546 -0.9130 0.5285 0.8140 1.9657
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -1.75261 11.46409 -0.153 0.878
width 0.10600 0.42656 0.248 0.804
factor(color)2 -8.28735 12.00363 -0.690 0.490
factor(color)3 -19.76545 13.34251 -1.481 0.139
factor(color)4 -4.10122 13.27532 -0.309 0.757
width:factor(color)2 0.31287 0.44794 0.698 0.485
width:factor(color)3 0.75237 0.50435 1.492 0.136
width:factor(color)4 0.09443 0.50042 0.189 0.850
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 225.76 on 172 degrees of freedom
Residual deviance: 183.08 on 165 degrees of freedom
AIC: 199.08
Number of Fisher Scoring iterations: 5
fitcwsintcw <- glm(y ~ width + factor(color) + width * factor(color) + factor(spine),
family = binomial, data = crabs)
summary(fitcwsintcw)
Call:
glm(formula = y ~ width + factor(color) + width * factor(color) +
factor(spine), family = binomial, data = crabs)
Deviance Residuals:
Min 1Q Median 3Q Max
-2.0544 -0.8952 0.5161 0.7806 1.9386
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -0.89601 11.83684 -0.076 0.940
width 0.07486 0.43835 0.171 0.864
factor(color)2 -8.35166 12.11823 -0.689 0.491
factor(color)3 -21.28416 13.51471 -1.575 0.115
factor(color)4 -4.70154 13.53059 -0.347 0.728
factor(spine)2 -0.27700 0.74077 -0.374 0.708
factor(spine)3 0.41186 0.51374 0.802 0.423
width:factor(color)2 0.30467 0.45300 0.673 0.501
width:factor(color)3 0.79709 0.51106 1.560 0.119
width:factor(color)4 0.10076 0.51097 0.197 0.844
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 225.76 on 172 degrees of freedom
Residual deviance: 181.64 on 163 degrees of freedom
AIC: 201.64
Number of Fisher Scoring iterations: 5
Analysis of Deviance Table (Type II tests)
Response: y
LR Chisq Df Pr(>Chisq)
width 22.2219 1 0.000002429 ***
factor(color) 7.8129 3 0.05004 .
factor(spine) 1.4436 2 0.48587
width:factor(color) 4.9749 3 0.17365
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
'log Lik.' 187.457 (df=5)
[1] 197.457
Start: AIC=201.2
y ~ weight + width + factor(color) + factor(spine)
Df Deviance AIC
- factor(spine) 2 186.21 198.21
- weight 1 186.61 200.61
- width 1 187.00 201.00
<none> 185.20 201.20
- factor(color) 3 192.80 202.80
Step: AIC=198.21
y ~ weight + width + factor(color)
Df Deviance AIC
- weight 1 187.46 197.46
<none> 186.21 198.21
- width 1 188.54 198.54
- factor(color) 3 192.89 198.89
Step: AIC=197.46
y ~ width + factor(color)
Df Deviance AIC
<none> 187.46 197.46
- factor(color) 3 194.45 198.45
- width 1 212.06 220.06
Call: glm(formula = y ~ width + factor(color), family = binomial, data = crabs)
Coefficients:
(Intercept) width factor(color)2 factor(color)3
-11.38519 0.46796 0.07242 -0.22380
factor(color)4
-1.32992
Degrees of Freedom: 172 Total (i.e. Null); 168 Residual
Null Deviance: 225.8
Residual Deviance: 187.5 AIC: 197.5
# p. 129
attach(crabs)
crabby <- data.frame(crabs$weight, crabs$width, crabs$color, crabs$spine, crabs$y)
bestglm(crabby, family = binomial, IC = "AIC")AIC
BICq equivalent for q in (0.477740316103793, 0.876695783647898)
Best Model:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -10.0708390 2.8068339 -3.587971 0.00033326115
crabs.width 0.4583097 0.1040181 4.406056 0.00001052696
crabs.color -0.5090467 0.2236817 -2.275763 0.02286018249
# p.131
Marijuana <- read.table("/Users/Patrick/Dropbox/data/agresti/Marijuana.dat",
header = T)
Marijuana$n <- Marijuana$yes + Marijuana$no
fitM <- glm(yes/n ~ gender + race, weights = n, family = binomial, data = Marijuana)
summary(fitM)
Call:
glm(formula = yes/n ~ gender + race, family = binomial, data = Marijuana,
weights = n)
Deviance Residuals:
1 2 3 4
-0.04513 0.04402 0.17321 -0.15493
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -0.83035 0.16854 -4.927 0.000000837 ***
gendermale 0.20261 0.08519 2.378 0.01739 *
racewhite 0.44374 0.16766 2.647 0.00813 **
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 12.752784 on 3 degrees of freedom
Residual deviance: 0.057982 on 1 degrees of freedom
AIC: 30.414
Number of Fisher Scoring iterations: 3
[1] 0.05798151
[1] 1
[1] 0.8097152
1 2 3 4
0.4045330 0.4541297 0.3035713 0.3480244
fit.yes <- Marijuana$n * fitted(fitM)
fit.no <- Marijuana$n * (1 - fitted(fitM))
attach(Marijuana)
data.frame(race, gender, yes, fit.yes, no, fit.no) race gender yes fit.yes no fit.no
1 white female 420 420.71429 620 619.28571
2 white male 483 482.28571 579 579.71429
3 other female 25 24.28571 55 55.71429
4 other male 32 32.71429 62 61.28571
# p.134 for Marijuana
cbind(rstandard(fitM, type = "pearson"), residuals(fitM, type = "pearson"),
rstandard(fitM, type = "deviance"), residuals(fitM, type = "deviance")) [,1] [,2] [,3] [,4]
1 -0.2409612 -0.04512876 -0.2409831 -0.04513287
2 0.2409612 0.04402293 0.2409512 0.04402111
3 0.2409612 0.17368497 0.2403069 0.17321334
4 -0.2409612 -0.15466480 -0.2413769 -0.15493163
# pp.132-133 for UFL admissions
UFLadmits <- read.table("/Users/Patrick/Dropbox/data/agresti/Admissions.dat",
header = T)
summary(UFLadmits) department gender yes no
anthropol : 2 Min. :0.0 Min. : 0.00 Min. : 0.00
astronomy : 2 1st Qu.:0.0 1st Qu.: 6.00 1st Qu.: 6.00
chemistry : 2 Median :0.5 Median :10.50 Median : 11.50
classics : 2 Mean :0.5 Mean :15.85 Mean : 29.28
communicat : 2 3rd Qu.:1.0 3rd Qu.:25.00 3rd Qu.: 41.00
computersci: 2 Max. :1.0 Max. :52.00 Max. :149.00
(Other) :34
department gender yes no
1 anthropol 0 21 41
2 anthropol 1 32 81
3 astronomy 0 3 8
4 astronomy 1 6 0
5 chemistry 0 34 110
6 chemistry 1 12 43
fitUFL <- glm(yes/(yes + no) ~ factor(department), weights = yes + no, family = binomial,
data = UFLadmits)
summary(fitUFL)
Call:
glm(formula = yes/(yes + no) ~ factor(department), family = binomial,
data = UFLadmits, weights = yes + no)
Deviance Residuals:
Min 1Q Median 3Q Max
-1.72781 -0.65292 -0.00096 0.76207 2.76258
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -0.8337 0.1645 -5.068 0.00000040233
factor(department)astronomy 0.9515 0.5130 1.855 0.063628
factor(department)chemistry -0.3681 0.2352 -1.565 0.117672
factor(department)classics 2.7796 1.0816 2.570 0.010174
factor(department)communicat -0.1921 0.2256 -0.852 0.394441
factor(department)computersci 0.5283 0.3887 1.359 0.174115
factor(department)english -0.3485 0.2172 -1.605 0.108596
factor(department)geography 1.3445 0.4005 3.357 0.000787
factor(department)geology 1.6810 0.4310 3.900 0.00009621661
factor(department)germanic 3.8782 1.0367 3.741 0.000183
factor(department)history 0.9027 0.3100 2.912 0.003593
factor(department)latinamer 1.6301 0.3003 5.429 0.00000005667
factor(department)linguistics 1.2756 0.3440 3.708 0.000209
factor(department)mathematics 0.8518 0.2512 3.391 0.000697
factor(department)philosophy 1.5269 0.5264 2.901 0.003722
factor(department)physics 0.2302 0.2670 0.862 0.388512
factor(department)polisci 0.5738 0.2340 2.452 0.014190
factor(department)psychology -2.4744 0.4470 -5.535 0.00000003108
factor(department)religion 0.3229 0.7486 0.431 0.666218
factor(department)romancelang 1.6165 0.3437 4.703 0.00000256280
factor(department)sociology 0.0572 0.3009 0.190 0.849234
factor(department)statistics 1.7758 0.2958 6.003 0.00000000193
factor(department)zoology -1.2808 0.3273 -3.913 0.00009098721
(Intercept) ***
factor(department)astronomy .
factor(department)chemistry
factor(department)classics *
factor(department)communicat
factor(department)computersci
factor(department)english
factor(department)geography ***
factor(department)geology ***
factor(department)germanic ***
factor(department)history **
factor(department)latinamer ***
factor(department)linguistics ***
factor(department)mathematics ***
factor(department)philosophy **
factor(department)physics
factor(department)polisci *
factor(department)psychology ***
factor(department)religion
factor(department)romancelang ***
factor(department)sociology
factor(department)statistics ***
factor(department)zoology ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 449.830 on 45 degrees of freedom
Residual deviance: 44.735 on 23 degrees of freedom
AIC: 241.42
Number of Fisher Scoring iterations: 5
2 4 6 8 10 12
-0.76456728 2.87096225 -0.26830432 -1.06904497 -0.63260081 1.15751874
14 16 18 20 22 24
0.94208925 2.16641024 -0.26082027 1.88730092 -0.17627090 1.64564062
26 28 30 32 34 36
1.37297695 1.28843796 1.34164079 1.32457581 -0.23317590 -2.27221543
38 40 42 44 46
1.26491106 0.13969719 0.30122617 -0.01229099 -1.75872555
fitUFL2 <- glm(yes/(yes + no) ~ gender + factor(department), weights = yes +
no, family = binomial, data = UFLadmits)
summary(fitUFL2)
Call:
glm(formula = yes/(yes + no) ~ gender + factor(department), family = binomial,
data = UFLadmits, weights = yes + no)
Deviance Residuals:
Min 1Q Median 3Q Max
-1.62850 -0.60675 0.00236 0.66695 2.64902
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -0.94678 0.18063 -5.242 0.000000159251
gender 0.17297 0.11235 1.540 0.123662
factor(department)astronomy 1.00375 0.51463 1.950 0.051123
factor(department)chemistry -0.30442 0.23897 -1.274 0.202701
factor(department)classics 2.80901 1.08230 2.595 0.009448
factor(department)communicat -0.24049 0.22780 -1.056 0.291107
factor(department)computersci 0.56223 0.38974 1.443 0.149143
factor(department)english -0.32170 0.21799 -1.476 0.140015
factor(department)geography 1.40439 0.40281 3.486 0.000489
factor(department)geology 1.74346 0.43339 4.023 0.000057492658
factor(department)germanic 3.86010 1.03685 3.723 0.000197
factor(department)history 0.96224 0.31279 3.076 0.002095
factor(department)latinamer 1.66738 0.30161 5.528 0.000000032331
factor(department)linguistics 1.27274 0.34426 3.697 0.000218
factor(department)mathematics 0.89785 0.25330 3.545 0.000393
factor(department)philosophy 1.61182 0.52964 3.043 0.002341
factor(department)physics 0.30586 0.27168 1.126 0.260258
factor(department)polisci 0.61696 0.23590 2.615 0.008913
factor(department)psychology -2.49115 0.44725 -5.570 0.000000025489
factor(department)religion 0.30550 0.74916 0.408 0.683431
factor(department)romancelang 1.58788 0.34432 4.612 0.000003995855
factor(department)sociology 0.05291 0.30113 0.176 0.860521
factor(department)statistics 1.82290 0.29778 6.122 0.000000000926
factor(department)zoology -1.25850 0.32771 -3.840 0.000123
(Intercept) ***
gender
factor(department)astronomy .
factor(department)chemistry
factor(department)classics **
factor(department)communicat
factor(department)computersci
factor(department)english
factor(department)geography ***
factor(department)geology ***
factor(department)germanic ***
factor(department)history **
factor(department)latinamer ***
factor(department)linguistics ***
factor(department)mathematics ***
factor(department)philosophy **
factor(department)physics
factor(department)polisci **
factor(department)psychology ***
factor(department)religion
factor(department)romancelang ***
factor(department)sociology
factor(department)statistics ***
factor(department)zoology ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 449.83 on 45 degrees of freedom
Residual deviance: 42.36 on 22 degrees of freedom
AIC: 241.05
Number of Fisher Scoring iterations: 5
Analysis of Deviance Table (Type II tests)
Response: yes/(yes + no)
LR Chisq Df Pr(>Chisq)
gender 2.38 1 0.1233
factor(department) 406.95 22 <0.0000000000000002 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
fitUFL3 <- glm(yes/(yes + no) ~ gender, weights = yes + no, family = binomial,
data = UFLadmits)
summary(fitUFL3)
Call:
glm(formula = yes/(yes + no) ~ gender, family = binomial, data = UFLadmits,
weights = yes + no)
Deviance Residuals:
Min 1Q Median 3Q Max
-9.3528 -0.7124 1.3534 2.7794 6.0234
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -0.57925 0.06648 -8.713 <0.0000000000000002 ***
gender -0.06623 0.09206 -0.720 0.472
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 449.83 on 45 degrees of freedom
Residual deviance: 449.31 on 44 degrees of freedom
AIC: 604
Number of Fisher Scoring iterations: 4
# p.135, Heart Disease and Blood Pressure
heart <- read.table("/Users/Patrick/Dropbox/data/agresti/HeartBP.dat", header = T)
summary(heart) bp n y
Min. :111.5 Min. : 43.0 Min. : 3.0
1st Qu.:129.0 1st Qu.: 95.5 1st Qu.: 8.0
Median :146.5 Median :147.5 Median :12.0
Mean :148.4 Mean :166.1 Mean :11.5
3rd Qu.:165.2 3rd Qu.:256.8 3rd Qu.:16.0
Max. :191.5 Max. :284.0 Max. :17.0
heart$pct <- heart$y/heart$n
fitHeart <- glm(y/n ~ bp, weights = n, family = binomial, data = heart)
summary(fitHeart)
Call:
glm(formula = y/n ~ bp, family = binomial, data = heart, weights = n)
Deviance Residuals:
Min 1Q Median 3Q Max
-1.0617 -0.5977 -0.2245 0.2140 1.8501
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -6.082033 0.724320 -8.397 < 0.0000000000000002 ***
bp 0.024338 0.004843 5.025 0.000000503 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 30.0226 on 7 degrees of freedom
Residual deviance: 5.9092 on 6 degrees of freedom
AIC: 42.61
Number of Fisher Scoring iterations: 4
a_hat <- coefficients(fitHeart)[1]
b_hat <- coefficients(fitHeart)[2]
heart$fit.yes <- round(heart$n * fitted(fitHeart), 1)
heart$StandardizedResiduals <- round(rstandard(fitHeart, type = "pearson"),
2)
heart bp n y pct fit.yes StandardizedResiduals
1 111.5 156 3 0.01923077 5.2 -1.11
2 121.5 252 17 0.06746032 10.6 2.37
3 131.5 284 12 0.04225352 15.1 -0.95
4 141.5 271 16 0.05904059 18.1 -0.57
5 151.5 139 12 0.08633094 11.6 0.13
6 161.5 85 8 0.09411765 8.9 -0.33
7 176.5 99 16 0.16161616 14.2 0.65
8 191.5 43 8 0.18604651 8.4 -0.18
# influence.measures(fitHeart)
xx <- seq(111, 192, length = 1000)
pi.hat <- binomial.logit.fit(xx, a_hat, b_hat)
xrange <- range(xx)
yrange <- range(0, 0.2)
plot(pct ~ bp, pch = 19, col = "orange", xlim = xrange, ylim = yrange, cex = 1.5,
xlab = "Blood Pressure Level", ylab = "Proportion", data = heart)
par(new = T)
plot(xx, pi.hat, type = "l", lwd = 3, col = "darkblue", xlab = "", ylab = "",
xlim = xrange, ylim = yrange)# p. 137, Infinite Estimate for Toy Example
x <- c(10 * (1:4), 10 * (6:9))
y <- c(rep(0, 4), rep(1, 4))
fit <- glm(y ~ x, family = binomial)
summary(fit)
Call:
glm(formula = y ~ x, family = binomial)
Deviance Residuals:
Min 1Q Median 3Q Max
-0.0000104467 -0.0000000211 0.0000000000 0.0000000211 0.0000104467
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -118.158 296046.187 0 1
x 2.363 5805.939 0 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 11.09035488895912 on 7 degrees of freedom
Residual deviance: 0.00000000021827 on 6 degrees of freedom
AIC: 4
Number of Fisher Scoring iterations: 25
'log Lik.' -0.000000000109134 (df=2)
Analysis of Deviance Table (Type II tests)
Response: y
LR Chisq Df Pr(>Chisq)
x 11.09 1 0.0008678 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Preliminary iteration .. Done
Profiling for parameter (Intercept) ... Done
Profiling for parameter x ... Done
Zooming for parameter (Intercept) ...
Zooming for parameter x ...
Lower Upper
(Intercept) -Inf -2.66963
x 0.05876605 Inf
attr(,"fitted object")
fit
# p. 139 Endometrial Cancer Grade example
ECG <- read.table("/Users/Patrick/Dropbox/data/agresti/Endometrial.dat", header = T)
summary(ECG) NV PI EH HG
Min. :0.0000 Min. : 0.00 Min. :0.270 Min. :0.0000
1st Qu.:0.0000 1st Qu.:11.00 1st Qu.:1.180 1st Qu.:0.0000
Median :0.0000 Median :16.00 Median :1.640 Median :0.0000
Mean :0.1646 Mean :17.38 Mean :1.662 Mean :0.3797
3rd Qu.:0.0000 3rd Qu.:21.00 3rd Qu.:2.015 3rd Qu.:1.0000
Max. :1.0000 Max. :49.00 Max. :3.610 Max. :1.0000
NV PI EH HG
1 0 13 1.64 0
2 0 16 2.26 0
3 0 8 3.14 0
4 0 34 2.68 0
5 0 20 1.28 0
6 0 5 2.31 0
NV PI EH HG
74 0 17 0.96 1
75 1 11 1.01 1
76 1 21 0.98 1
77 0 5 0.35 1
78 1 19 1.02 1
79 0 33 0.85 1
0 1
0 49 17
1 0 13
Call:
glm(formula = HG ~ NV + PI + EH, family = binomial, data = ECG)
Deviance Residuals:
Min 1Q Median 3Q Max
-1.50137 -0.64108 -0.29432 0.00016 2.72777
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 4.30452 1.63730 2.629 0.008563 **
NV 18.18556 1715.75089 0.011 0.991543
PI -0.04218 0.04433 -0.952 0.341333
EH -2.90261 0.84555 -3.433 0.000597 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 104.903 on 78 degrees of freedom
Residual deviance: 55.393 on 75 degrees of freedom
AIC: 63.393
Number of Fisher Scoring iterations: 17
'log Lik.' -27.69663 (df=4)
Analysis of Deviance Table (Type II tests)
Response: HG
LR Chisq Df Pr(>Chisq)
NV 9.3576 1 0.002221 **
PI 0.9851 1 0.320934
EH 19.7606 1 0.000008777 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Preliminary iteration .... Done
Profiling for parameter (Intercept) ... Done
Profiling for parameter NV ... Done
Profiling for parameter PI ... Done
Profiling for parameter EH ... Done
Zooming for parameter (Intercept) ...
Zooming for parameter NV ...
Zooming for parameter PI ...
Zooming for parameter EH ...
Lower Upper
(Intercept) 1.4327458 7.95477715
NV 1.2841117 Inf
PI -0.1370768 0.03818467
EH -4.7859125 -1.43638895
attr(,"fitted object")
fit
Separation: TRUE
Existence of maximum likelihood estimates
(Intercept) NV PI EH
0 Inf 0 0
0: finite value, Inf: infinity, -Inf: -infinity
# Bayesian p.141
ECG$PI2 <- scale(ECG$PI)
ECG$EH2 <- scale(ECG$EH)
ECG$NV2 <- ECG$NV - 0.5
head(ECG) NV PI EH HG PI2 EH2 NV2
1 0 13 1.64 0 -0.4380700 -0.03269071 -0.5
2 0 16 2.26 0 -0.1380047 0.90367819 -0.5
3 0 8 3.14 0 -0.9381787 2.23271792 -0.5
4 0 34 2.68 0 1.6623869 1.53799261 -0.5
5 0 20 1.28 0 0.2620823 -0.57638878 -0.5
6 0 5 2.31 0 -1.2382440 0.97919181 -0.5
NV PI EH HG
Min. :0.0000 Min. : 0.00 Min. :0.270 Min. :0.0000
1st Qu.:0.0000 1st Qu.:11.00 1st Qu.:1.180 1st Qu.:0.0000
Median :0.0000 Median :16.00 Median :1.640 Median :0.0000
Mean :0.1646 Mean :17.38 Mean :1.662 Mean :0.3797
3rd Qu.:0.0000 3rd Qu.:21.00 3rd Qu.:2.015 3rd Qu.:1.0000
Max. :1.0000 Max. :49.00 Max. :3.610 Max. :1.0000
PI2.V1 EH2.V1 NV2
Min. :-1.738353 Min. :-2.1017639 Min. :-0.5000
1st Qu.:-0.638113 1st Qu.:-0.7274160 1st Qu.:-0.5000
Median :-0.138005 Median :-0.0326907 Median :-0.5000
Mean : 0.000000 Mean : 0.0000000 Mean :-0.3354
3rd Qu.: 0.362104 3rd Qu.: 0.5336614 3rd Qu.:-0.5000
Max. : 3.162713 Max. : 2.9425460 Max. : 0.5000
Call:
glm(formula = HG ~ NV2 + PI2 + EH2, family = binomial, data = ECG)
Deviance Residuals:
Min 1Q Median 3Q Max
-1.50137 -0.64108 -0.29432 0.00016 2.72777
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 7.8411 857.8755 0.009 0.992707
NV2 18.1856 1715.7509 0.011 0.991543
PI2 -0.4217 0.4432 -0.952 0.341333
EH2 -1.9219 0.5599 -3.433 0.000597 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 104.903 on 78 degrees of freedom
Residual deviance: 55.393 on 75 degrees of freedom
AIC: 63.393
Number of Fisher Scoring iterations: 17
fit.Bayes <- MCMClogit(HG ~ NV2 + PI2 + EH2, mcmc = 100000, b0 = 0, B0 = 0.01,
data = ECG)
summary(fit.Bayes)
Iterations = 1001:101000
Thinning interval = 1
Number of chains = 1
Sample size per chain = 100000
1. Empirical mean and standard deviation for each variable,
plus standard error of the mean:
Mean SD Naive SE Time-series SE
(Intercept) 3.2356 2.5948 0.008206 0.026682
NV2 9.1626 5.1639 0.016330 0.053109
PI2 -0.4711 0.4546 0.001437 0.006376
EH2 -2.1332 0.5879 0.001859 0.008450
2. Quantiles for each variable:
2.5% 25% 50% 75% 97.5%
(Intercept) -0.3391 1.2619 2.7161 4.6972 9.4865
NV2 2.1105 5.2437 8.1064 12.1133 21.6077
PI2 -1.4163 -0.7676 -0.4445 -0.1538 0.3538
EH2 -3.3781 -2.5087 -2.0977 -1.7227 -1.0786
# Firth adjustment p.144
fit.penalized <- logistf(HG ~ NV2 + PI2 + EH2, family = binomial, data = ECG)
summary(fit.penalized)logistf(formula = HG ~ NV2 + PI2 + EH2, data = ECG, family = binomial)
Model fitted by Penalized ML
Confidence intervals and p-values by Profile Likelihood Profile Likelihood Profile Likelihood Profile Likelihood
coef se(coef) lower 0.95 upper 0.95 Chisq
(Intercept) 0.3080221 0.8006134 -0.9754702 2.7888475 0.1689951
NV2 2.9292733 1.5507637 0.6097274 7.8546317 6.7984572
PI2 -0.3474419 0.3956954 -1.2443165 0.4044667 0.7468285
EH2 -1.7243007 0.5138263 -2.8903284 -0.8162243 17.7593175
p
(Intercept) 0.68100641485
NV2 0.00912366755
PI2 0.38748220357
EH2 0.00002506867
Likelihood ratio test=43.65582 on 3 df, p=0.00000000178586, n=79
Wald test = 17.47967 on 3 df, p = 0.0005630434
Covariance-Matrix:
[,1] [,2] [,3] [,4]
[1,] 0.64098180 1.1212997 -0.03217885 0.12938806
[2,] 1.12129968 2.4048680 -0.10283853 0.13152711
[3,] -0.03217885 -0.1028385 0.15657483 0.03961766
[4,] 0.12938806 0.1315271 0.03961766 0.26401742
# p.148 Probit example, back to p.70 Snoring and Heart Disease
heart <- read.table("/Users/Patrick/Dropbox/data/agresti/Heart.dat", header = T)
heart$x <- dplyr::recode(heart$snoring, never = 0, occasional = 2, nearly_every_night = 4,
every_night = 5)
fit.probit <- glm(yes/(yes + no) ~ x, family = binomial(link = probit), weights = yes +
no, data = heart)
summary(fit.probit)
Call:
glm(formula = yes/(yes + no) ~ x, family = binomial(link = probit),
data = heart, weights = yes + no)
Deviance Residuals:
1 2 3 4
-0.6188 1.0388 0.1684 -0.6175
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -2.06055 0.07017 -29.367 < 0.0000000000000002 ***
x 0.18777 0.02348 7.997 0.00000000000000128 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 65.9045 on 3 degrees of freedom
Residual deviance: 1.8716 on 2 degrees of freedom
AIC: 26.124
Number of Fisher Scoring iterations: 4
1 2 3 4
0.01967292 0.04599325 0.09518763 0.13099515
[1] 0.01967292 0.04599325 0.09518763 0.13099515
fit.logit <- glm(yes/(yes + no) ~ x, family = binomial, weights = yes + no,
data = heart)
summary(fit.logit)
Call:
glm(formula = yes/(yes + no) ~ x, family = binomial, data = heart,
weights = yes + no)
Deviance Residuals:
1 2 3 4
-0.8346 1.2521 0.2758 -0.6845
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -3.86625 0.16621 -23.261 < 0.0000000000000002 ***
x 0.39734 0.05001 7.945 0.00000000000000194 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 65.9045 on 3 degrees of freedom
Residual deviance: 2.8089 on 2 degrees of freedom
AIC: 27.061
Number of Fisher Scoring iterations: 4
# Sample size calculation on p.151
theta.tilde <- (0.12/0.88)/(0.08/0.92)
lambda.tilde <- log(theta.tilde)
delta <- (1 + (1 + lambda.tilde^2) * exp(1.25 * lambda.tilde^2))/(1 + exp(-lambda.tilde^2/4))
pi.bar <- 0.08
za <- qnorm(1 - 0.05)
zb <- qnorm(1 - 0.1)
n <- (za + zb * exp(-lambda.tilde^2/4))^2 * (1 + 2 * pi.bar * delta)/(pi.bar *
lambda.tilde^2)# BCL: Alligators pp.159 - 164
gators <- read.table("/Users/Patrick/Dropbox/data/agresti/Alligators.dat", header = T)
summary(gators) x y
Min. :1.240 F:31
1st Qu.:1.575 I:20
Median :1.850 O: 8
Mean :2.130
3rd Qu.:2.450
Max. :3.890
x y
1 1.24 I
2 1.30 I
3 1.30 I
4 1.32 F
5 1.32 F
6 1.40 F
sm.density.compare(gators$x, gators$y, lwd = 3, xlab = "Alligator length in meters")
legend("topright", levels(as.factor(gators$y)), fill = c(2:4))
Call:
vglm(formula = y ~ x, family = multinomial, data = gators)
Pearson residuals:
Min 1Q Median 3Q Max
log(mu[,1]/mu[,3]) -2.330 -0.5075 0.5538 0.6836 1.452
log(mu[,2]/mu[,3]) -2.687 -0.4821 -0.1653 0.7093 3.439
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept):1 1.6177 1.3073 1.237 0.21591
(Intercept):2 5.6974 1.7937 3.176 0.00149 **
x:1 -0.1101 0.5171 -0.213 0.83137
x:2 -2.4654 0.8996 NA NA
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Names of linear predictors: log(mu[,1]/mu[,3]), log(mu[,2]/mu[,3])
Residual deviance: 98.3412 on 114 degrees of freedom
Log-likelihood: -49.1706 on 114 degrees of freedom
Number of Fisher scoring iterations: 5
Warning: Hauck-Donner effect detected in the following estimate(s):
'x:2'
Reference group is level 3 of the response
(Intercept):1
-4.079713
x:1
2.355337
Call:
vglm(formula = y ~ x, family = multinomial(refLevel = "I"), data = gators)
Pearson residuals:
Min 1Q Median 3Q Max
log(mu[,1]/mu[,2]) -2.882 -0.8133 0.4313 0.6837 1.691
log(mu[,3]/mu[,2]) -2.163 -0.3755 -0.2311 -0.1262 3.530
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept):1 -4.0797 1.4686 -2.778 0.00547 **
(Intercept):2 -5.6974 1.7937 -3.176 0.00149 **
x:1 2.3553 0.8032 NA NA
x:2 2.4654 0.8996 2.741 0.00613 **
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Names of linear predictors: log(mu[,1]/mu[,2]), log(mu[,3]/mu[,2])
Residual deviance: 98.3412 on 114 degrees of freedom
Log-likelihood: -49.1706 on 114 degrees of freedom
Number of Fisher scoring iterations: 5
Warning: Hauck-Donner effect detected in the following estimate(s):
'x:1'
Reference group is level 2 of the response
[1] 115.1419
Likelihood ratio test
Model 1: y ~ 1
Model 2: y ~ x
#Df LogLik Df Chisq Pr(>Chisq)
1 116 -57.571
2 114 -49.171 -2 16.801 0.0002248 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
2.5 % 97.5 %
(Intercept):1 -7.3475058 -1.518699
(Intercept):2 -9.5913317 -2.485991
x:1 1.0111800 4.199073
x:2 0.8775186 4.463608
F I O
1 0.2265307 0.7219640 0.05150528
2 0.2502564 0.6924668 0.05727683
3 0.2502564 0.6924668 0.05727683
4 0.2584591 0.6822562 0.05928463
5 0.2584591 0.6822562 0.05928463
6 0.2925882 0.6397049 0.06770685
F I O
54 0.7650896 0.010326420 0.2245840
55 0.7650743 0.009851059 0.2250746
56 0.7648452 0.008156804 0.2269980
57 0.7647495 0.007780500 0.2274700
58 0.7645799 0.007248095 0.2281720
59 0.7630060 0.004733748 0.2322603
# to make plot
BCL.pi1 <- function(x, a1, b1, a2, b2) {
ex1 <- exp(a1 + b1 * x)
ex2 <- exp(a2 + b2 * x)
den <- 1 + ex1 + ex2
ex1/den
}
BCL.pi2 <- function(x, a1, b1, a2, b2) {
ex1 <- exp(a1 + b1 * x)
ex2 <- exp(a2 + b2 * x)
den <- 1 + ex1 + ex2
ex2/den
}
BCL.pi3 <- function(x, a1, b1, a2, b2) {
ex1 <- exp(a1 + b1 * x)
ex2 <- exp(a2 + b2 * x)
den <- 1 + ex1 + ex2
1/den
}
xx <- seq(0, 5, length = 1000)
a1hat <- coefficients(fit)[1]
a2hat <- coefficients(fit)[2]
b1hat <- coefficients(fit)[3]
b2hat <- coefficients(fit)[4]
pi1 <- BCL.pi1(xx, a1hat, b1hat, a2hat, b2hat)
pi2 <- BCL.pi2(xx, a1hat, b1hat, a2hat, b2hat)
pi3 <- BCL.pi3(xx, a1hat, b1hat, a2hat, b2hat)
xrange <- range(xx)
yrange <- range(0, 1)
plot(xx, pi1, type = "l", lwd = 3, xlim = xrange, ylim = yrange, xlab = "Alligator length",
ylab = "Probability")
par(new = T)
plot(xx, pi2, type = "l", lwd = 3, lty = 3, col = "purple", xlim = xrange, ylim = yrange,
xlab = "", ylab = "")
par(new = T)
plot(xx, pi3, type = "l", lwd = 3, lty = 4, col = "orange", xlim = xrange, ylim = yrange,
xlab = "", ylab = "")
legend("topright", legend = c("Fish", "Invertebrates", "Other"), lty = c(1,
3, 4), lwd = 3, col = c("black", "purple", "orange"))
title("BCL Fit to Alligator Data")# BCL: Belief in the Afterlife, pp.165 - 166
after <- read.table("/Users/Patrick/Dropbox/data/agresti/Afterlife.dat", header = T)
after$n <- after$yes + after$undecided + after$no
fit <- vglm(cbind(yes, undecided, no) ~ gender + race, family = multinomial,
data = after)
summary(fit)
Call:
vglm(formula = cbind(yes, undecided, no) ~ gender + race, family = multinomial,
data = after)
Pearson residuals:
log(mu[,1]/mu[,3]) log(mu[,2]/mu[,3])
1 -0.2190 -0.1143
2 0.2284 0.1115
3 0.4709 0.2303
4 -0.6184 -0.2795
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept):1 1.3016 0.2265 5.747 0.0000000091 ***
(Intercept):2 -0.6529 0.3405 -1.918 0.0551 .
gendermale:1 -0.4186 0.1713 -2.444 0.0145 *
gendermale:2 -0.1051 0.2465 -0.426 0.6700
racewhite:1 0.3418 0.2370 1.442 0.1493
racewhite:2 0.2710 0.3541 0.765 0.4442
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Names of linear predictors: log(mu[,1]/mu[,3]), log(mu[,2]/mu[,3])
Residual deviance: 0.8539 on 2 degrees of freedom
Log-likelihood: -19.7324 on 2 degrees of freedom
Number of Fisher scoring iterations: 3
No Hauck-Donner effect found in any of the estimates
Reference group is level 3 of the response
Call:
vglm(formula = cbind(yes, undecided, no) ~ race, family = multinomial,
data = after)
Pearson residuals:
log(mu[,1]/mu[,3]) log(mu[,2]/mu[,3])
1 1.418 -0.2420
2 -1.648 0.2811
3 1.024 0.1910
4 -1.465 -0.2733
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept):1 1.1564 0.2167 5.337 0.0000000945 ***
(Intercept):2 -0.6931 0.3273 -2.118 0.0342 *
racewhite:1 0.2982 0.2355 1.266 0.2055
racewhite:2 0.2597 0.3531 0.736 0.4620
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Names of linear predictors: log(mu[,1]/mu[,3]), log(mu[,2]/mu[,3])
Residual deviance: 8.0465 on 4 degrees of freedom
Log-likelihood: -23.3287 on 4 degrees of freedom
Number of Fisher scoring iterations: 4
No Hauck-Donner effect found in any of the estimates
Reference group is level 3 of the response
Likelihood ratio test
Model 1: cbind(yes, undecided, no) ~ gender + race
Model 2: cbind(yes, undecided, no) ~ race
#Df LogLik Df Chisq Pr(>Chisq)
1 2 -19.732
2 4 -23.329 2 7.1926 0.02742 *
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Call:
vglm(formula = cbind(yes, undecided, no) ~ gender, family = multinomial,
data = after)
Pearson residuals:
log(mu[,1]/mu[,3]) log(mu[,2]/mu[,3])
1 0.1991 0.03849
2 0.4982 0.21597
3 -0.4716 -0.09120
4 -1.4535 -0.63008
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept):1 1.5867 0.1163 13.639 <0.0000000000000002 ***
(Intercept):2 -0.4282 0.1688 -2.537 0.0112 *
gendermale:1 -0.4008 0.1705 -2.350 0.0188 *
gendermale:2 -0.0906 0.2457 -0.369 0.7123
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Names of linear predictors: log(mu[,1]/mu[,3]), log(mu[,2]/mu[,3])
Residual deviance: 2.8481 on 4 degrees of freedom
Log-likelihood: -20.7295 on 4 degrees of freedom
Number of Fisher scoring iterations: 3
No Hauck-Donner effect found in any of the estimates
Reference group is level 3 of the response
Likelihood ratio test
Model 1: cbind(yes, undecided, no) ~ gender + race
Model 2: cbind(yes, undecided, no) ~ gender
#Df LogLik Df Chisq Pr(>Chisq)
1 2 -19.732
2 4 -20.730 2 1.9942 0.3689
after.race after.gender yes undecided no
1 white female 0.7545608 0.09956287 0.1458763
2 white male 0.6782703 0.12244794 0.1992817
3 black female 0.7073517 0.10018119 0.1924671
4 black male 0.6221640 0.12055943 0.2572766
after.race after.gender after.yes after.undecided after.no yes
1 white female 371 49 74 372.75305
2 white male 250 45 71 248.24695
3 black female 64 9 15 62.24695
4 black male 25 5 13 26.75305
undecided no
1 49.184055 72.06289
2 44.815945 72.93711
3 8.815945 16.93711
4 5.184055 11.06289
# PO: Political Ideology pp.170-171
politics <- read.table("/Users/Patrick/Dropbox/data/agresti/Polviews.dat", header = T)
politics$n <- politics$y1 + politics$y2 + politics$y3 + politics$y4 + politics$y5
fit <- vglm(cbind(y1, y2, y3, y4, y5) ~ party + gender, family = cumulative(parallel = T),
data = politics)
summary(fit)
Call:
vglm(formula = cbind(y1, y2, y3, y4, y5) ~ party + gender, family = cumulative(parallel = T),
data = politics)
Pearson residuals:
logitlink(P[Y<=1]) logitlink(P[Y<=2]) logitlink(P[Y<=3])
1 -0.2505 -0.6258 0.63464
2 -0.7075 0.6437 -0.08234
3 0.5157 0.9772 -0.52995
4 -0.5193 -1.3318 -0.32096
logitlink(P[Y<=4])
1 -1.1078
2 0.7512
3 -1.3012
4 -0.1741
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept):1 -2.12233 0.16875 -12.577 <0.0000000000000002 ***
(Intercept):2 0.16892 0.11481 1.471 0.141
(Intercept):3 1.85716 0.15103 12.297 <0.0000000000000002 ***
(Intercept):4 4.65005 0.23496 19.791 <0.0000000000000002 ***
partyrepub -3.63366 0.21785 -16.680 <0.0000000000000002 ***
gendermale 0.04731 0.14955 0.316 0.752
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Names of linear predictors: logitlink(P[Y<=1]), logitlink(P[Y<=2]),
logitlink(P[Y<=3]), logitlink(P[Y<=4])
Residual deviance: 9.8072 on 10 degrees of freedom
Log-likelihood: -35.2032 on 10 degrees of freedom
Number of Fisher scoring iterations: 4
No Hauck-Donner effect found in any of the estimates
Exponentiated coefficients:
partyrepub gendermale
0.02641936 1.04844945
gender party y1 y2 y3 y4 y5
1 female dem 0.106945695 0.43518307 0.3228363 0.1255644 0.009470552
2 female repub 0.003153813 0.02717842 0.1144033 0.5895341 0.265730342
3 male dem 0.111549168 0.44229817 0.3165490 0.1205668 0.009036867
4 male repub 0.003306108 0.02844904 0.1189361 0.5927070 0.256601745
gender party y1 y2 y3 y4 y5 y1.1
1 female dem 0.04917311 0.05267166 0.03970426 0.01349427 4 65.455334
2 female repub 0.04952472 0.05304689 0.03999101 0.01359440 32 1.930268
3 male dem 0.04987871 0.05342464 0.04027974 0.01369527 3 68.272856
4 male repub 0.05023509 0.05380493 0.04057047 0.01379688 32 2.023480
5 female dem 0.05059389 0.05418776 0.04086321 0.01389923 4 65.455334
6 female repub 0.05095511 0.05457317 0.04115797 0.01400233 32 1.930268
7 male dem 0.05131877 0.05496116 0.04145476 0.01410618 3 68.272856
8 male repub 0.05168488 0.05535174 0.04175360 0.01421080 32 2.023480
9 female dem 0.05205347 0.05574493 0.04205450 0.01431617 4 65.455334
10 female repub 0.05242453 0.05614076 0.04235748 0.01442232 32 1.930268
11 male dem 0.05279810 0.05653922 0.04266254 0.01452924 3 68.272856
12 male repub 0.05317417 0.05694034 0.04296969 0.01463694 32 2.023480
13 female dem 0.05355278 0.05734414 0.04327896 0.01474543 4 65.455334
14 female repub 0.05393392 0.05775062 0.04359035 0.01485471 32 1.930268
15 male dem 0.05431763 0.05815981 0.04390389 0.01496479 3 68.272856
16 male repub 0.05470390 0.05857172 0.04421957 0.01507567 32 2.023480
17 female dem 0.05509276 0.05898636 0.04453741 0.01518737 4 65.455334
18 female repub 0.05548423 0.05940375 0.04485744 0.01529987 32 1.930268
19 male dem 0.05587831 0.05982390 0.04517965 0.01541320 3 68.272856
20 male repub 0.05627502 0.06024684 0.04550407 0.01552735 32 2.023480
21 female dem 0.05667438 0.06067258 0.04583070 0.01564233 4 65.455334
22 female repub 0.05707641 0.06110113 0.04615957 0.01575816 32 1.930268
23 male dem 0.05748111 0.06153250 0.04649068 0.01587482 3 68.272856
24 male repub 0.05788850 0.06196672 0.04682405 0.01599234 32 2.023480
25 female dem 0.05829861 0.06240380 0.04715969 0.01611071 4 65.455334
26 female repub 0.05871143 0.06284376 0.04749762 0.01622994 32 1.930268
27 male dem 0.05912700 0.06328661 0.04783785 0.01635004 3 68.272856
28 male repub 0.05954532 0.06373237 0.04818039 0.01647102 32 2.023480
29 female dem 0.05996642 0.06418105 0.04852526 0.01659287 4 65.455334
30 female repub 0.06039030 0.06463268 0.04887248 0.01671561 32 1.930268
31 male dem 0.06081698 0.06508726 0.04922204 0.01683925 3 68.272856
32 male repub 0.06124648 0.06554481 0.04957398 0.01696378 32 2.023480
33 female dem 0.06167882 0.06600536 0.04992830 0.01708921 4 65.455334
34 female repub 0.06211400 0.06646891 0.05028502 0.01721556 32 1.930268
35 male dem 0.06255205 0.06693548 0.05064416 0.01734283 3 68.272856
36 male repub 0.06299299 0.06740509 0.05100572 0.01747102 32 2.023480
37 female dem 0.06343682 0.06787775 0.05136972 0.01760014 4 65.455334
38 female repub 0.06388356 0.06835349 0.05173618 0.01773019 32 1.930268
39 male dem 0.06433324 0.06883231 0.05210511 0.01786120 3 68.272856
40 male repub 0.06478586 0.06931424 0.05247652 0.01799315 32 2.023480
41 female dem 0.06524144 0.06979929 0.05285044 0.01812605 4 65.455334
42 female repub 0.06570000 0.07028748 0.05322686 0.01825993 32 1.930268
43 male dem 0.06616156 0.07077883 0.05360582 0.01839477 3 68.272856
44 male repub 0.06662613 0.07127334 0.05398732 0.01853059 32 2.023480
45 female dem 0.06709372 0.07177104 0.05437138 0.01866739 4 65.455334
46 female repub 0.06756436 0.07227195 0.05475802 0.01880518 32 1.930268
47 male dem 0.06803806 0.07277608 0.05514724 0.01894397 3 68.272856
48 male repub 0.06851484 0.07328345 0.05553907 0.01908377 32 2.023480
49 female dem 0.06899471 0.07379407 0.05593352 0.01922457 4 65.455334
50 female repub 0.06947769 0.07430797 0.05633060 0.01936640 32 1.930268
51 male dem 0.06996380 0.07482516 0.05673033 0.01950925 3 68.272856
52 male repub 0.07045305 0.07534565 0.05713273 0.01965313 32 2.023480
53 female dem 0.07094547 0.07586947 0.05753781 0.01979805 4 65.455334
54 female repub 0.07144106 0.07639663 0.05794558 0.01994402 32 1.930268
55 male dem 0.07193984 0.07692714 0.05835606 0.02009104 3 68.272856
56 male repub 0.07244183 0.07746103 0.05876927 0.02023913 32 2.023480
57 female dem 0.07294706 0.07799831 0.05918522 0.02038828 4 65.455334
58 female repub 0.07345552 0.07853901 0.05960393 0.02053851 32 1.930268
59 male dem 0.07396725 0.07908313 0.06002541 0.02068983 3 68.272856
60 male repub 0.07448226 0.07963069 0.06044968 0.02084223 32 2.023480
61 female dem 0.07500056 0.08018171 0.06087676 0.02099573 4 65.455334
62 female repub 0.07552217 0.08073622 0.06130665 0.02115034 32 1.930268
63 male dem 0.07604711 0.08129421 0.06173939 0.02130607 3 68.272856
64 male repub 0.07657540 0.08185572 0.06217497 0.02146291 32 2.023480
65 female dem 0.07710706 0.08242077 0.06261342 0.02162088 4 65.455334
66 female repub 0.07764209 0.08298936 0.06305476 0.02177999 32 1.930268
67 male dem 0.07818052 0.08356151 0.06349899 0.02194025 3 68.272856
68 male repub 0.07872237 0.08413725 0.06394615 0.02210166 32 2.023480
69 female dem 0.07926765 0.08471659 0.06439623 0.02226422 4 65.455334
70 female repub 0.07981638 0.08529954 0.06484927 0.02242796 32 1.930268
71 male dem 0.08036858 0.08588613 0.06530526 0.02259287 3 68.272856
72 male repub 0.08092426 0.08647638 0.06576424 0.02275897 32 2.023480
73 female dem 0.08148344 0.08707029 0.06622622 0.02292626 4 65.455334
74 female repub 0.08204614 0.08766789 0.06669121 0.02309475 32 1.930268
75 male dem 0.08261238 0.08826919 0.06715923 0.02326445 3 68.272856
76 male repub 0.08318217 0.08887422 0.06763029 0.02343536 32 2.023480
77 female dem 0.08375553 0.08948299 0.06810442 0.02360750 4 65.455334
78 female repub 0.08433249 0.09009552 0.06858163 0.02378088 32 1.930268
79 male dem 0.08491304 0.09071182 0.06906194 0.02395549 3 68.272856
80 male repub 0.08549722 0.09133191 0.06954535 0.02413136 32 2.023480
81 female dem 0.08608505 0.09195581 0.07003190 0.02430849 4 65.455334
82 female repub 0.08667653 0.09258355 0.07052159 0.02448688 32 1.930268
83 male dem 0.08727168 0.09321512 0.07101445 0.02466655 3 68.272856
84 male repub 0.08787053 0.09385056 0.07151048 0.02484750 32 2.023480
85 female dem 0.08847309 0.09448988 0.07200971 0.02502975 4 65.455334
86 female repub 0.08907938 0.09513310 0.07251215 0.02521330 32 1.930268
87 male dem 0.08968942 0.09578023 0.07301783 0.02539816 3 68.272856
88 male repub 0.09030322 0.09643130 0.07352675 0.02558434 32 2.023480
89 female dem 0.09092080 0.09708632 0.07403893 0.02577185 4 65.455334
90 female repub 0.09154217 0.09774530 0.07455440 0.02596070 32 1.930268
91 male dem 0.09216737 0.09840827 0.07507316 0.02615089 3 68.272856
92 male repub 0.09279640 0.09907524 0.07559524 0.02634244 32 2.023480
93 female dem 0.09342928 0.09974624 0.07612065 0.02653536 4 65.455334
94 female repub 0.09406602 0.10042127 0.07664940 0.02672965 32 1.930268
95 male dem 0.09470666 0.10110035 0.07718153 0.02692532 3 68.272856
96 male repub 0.09535120 0.10178351 0.07771704 0.02712238 32 2.023480
97 female dem 0.09599965 0.10247076 0.07825594 0.02732085 4 65.455334
98 female repub 0.09665205 0.10316212 0.07879827 0.02752072 32 1.930268
99 male dem 0.09730841 0.10385760 0.07934403 0.02772202 3 68.272856
100 male repub 0.09796874 0.10455722 0.07989324 0.02792475 32 2.023480
101 female dem 0.09863306 0.10526100 0.08044592 0.02812892 4 65.455334
102 female repub 0.09930138 0.10596896 0.08100209 0.02833453 32 1.930268
103 male dem 0.09997374 0.10668111 0.08156177 0.02854161 3 68.272856
104 male repub 0.10065014 0.10739748 0.08212496 0.02875015 32 2.023480
105 female dem 0.10133060 0.10811807 0.08269169 0.02896017 4 65.455334
106 female repub 0.10201513 0.10884291 0.08326198 0.02917168 32 1.930268
107 male dem 0.10270377 0.10957201 0.08383585 0.02938469 3 68.272856
108 male repub 0.10339652 0.11030539 0.08441330 0.02959921 32 2.023480
109 female dem 0.10409339 0.11104306 0.08499436 0.02981524 4 65.455334
110 female repub 0.10479442 0.11178505 0.08557905 0.03003280 32 1.930268
111 male dem 0.10549961 0.11253137 0.08616738 0.03025190 3 68.272856
112 male repub 0.10620898 0.11328204 0.08675937 0.03047255 32 2.023480
113 female dem 0.10692256 0.11403707 0.08735504 0.03069476 4 65.455334
114 female repub 0.10764035 0.11479648 0.08795441 0.03091854 32 1.930268
115 male dem 0.10836237 0.11556029 0.08855749 0.03114389 3 68.272856
116 male repub 0.10908864 0.11632851 0.08916430 0.03137083 32 2.023480
117 female dem 0.10981919 0.11710117 0.08977486 0.03159938 4 65.455334
118 female repub 0.11055402 0.11787827 0.09038919 0.03182953 32 1.930268
119 male dem 0.11129315 0.11865983 0.09100729 0.03206131 3 68.272856
120 male repub 0.11203660 0.11944588 0.09162920 0.03229471 32 2.023480
121 female dem 0.11278438 0.12023642 0.09225493 0.03252976 4 65.455334
122 female repub 0.11353652 0.12103148 0.09288450 0.03276646 32 1.930268
123 male dem 0.11429303 0.12183106 0.09351791 0.03300483 3 68.272856
124 male repub 0.11505392 0.12263519 0.09415520 0.03324486 32 2.023480
125 female dem 0.11581922 0.12344388 0.09479638 0.03348659 4 65.455334
126 female repub 0.11658894 0.12425715 0.09544147 0.03373001 32 1.930268
127 male dem 0.11736309 0.12507501 0.09609047 0.03397514 3 68.272856
128 male repub 0.11814170 0.12589748 0.09674342 0.03422198 32 2.023480
129 female dem 0.11892478 0.12672458 0.09740033 0.03447056 4 65.455334
130 female repub 0.11971234 0.12755632 0.09806122 0.03472088 32 1.930268
131 male dem 0.12050440 0.12839271 0.09872609 0.03497294 3 68.272856
132 male repub 0.12130099 0.12923378 0.09939498 0.03522678 32 2.023480
133 female dem 0.12210210 0.13007953 0.10006790 0.03548238 4 65.455334
134 female repub 0.12290777 0.13092999 0.10074487 0.03573977 32 1.930268
135 male dem 0.12371801 0.13178516 0.10142589 0.03599896 3 68.272856
136 male repub 0.12453283 0.13264507 0.10211100 0.03625996 32 2.023480
137 female dem 0.12535224 0.13350972 0.10280021 0.03652278 4 65.455334
138 female repub 0.12617627 0.13437914 0.10349353 0.03678743 32 1.930268
139 male dem 0.12700494 0.13525334 0.10419099 0.03705393 3 68.272856
140 male repub 0.12783825 0.13613232 0.10489259 0.03732228 32 2.023480
141 female dem 0.12867621 0.13701612 0.10559837 0.03759250 4 65.455334
142 female repub 0.12951886 0.13790474 0.10630833 0.03786459 32 1.930268
143 male dem 0.13036620 0.13879819 0.10702249 0.03813858 3 68.272856
144 male repub 0.13121825 0.13969650 0.10774087 0.03841448 32 2.023480
145 female dem 0.13207502 0.14059967 0.10846348 0.03869229 4 65.455334
146 female repub 0.13293653 0.14150771 0.10919035 0.03897202 32 1.930268
147 male dem 0.13380279 0.14242065 0.10992149 0.03925370 3 68.272856
148 male repub 0.13467382 0.14333850 0.11065692 0.03953733 32 2.023480
149 female dem 0.13554963 0.14426127 0.11139665 0.03982292 4 65.455334
150 female repub 0.13643024 0.14518897 0.11214070 0.04011049 32 1.930268
151 male dem 0.13731566 0.14612162 0.11288910 0.04040004 3 68.272856
152 male repub 0.13820591 0.14705922 0.11364184 0.04069161 32 2.023480
153 female dem 0.13910100 0.14800181 0.11439896 0.04098518 4 65.455334
154 female repub 0.14000095 0.14894937 0.11516047 0.04128078 32 1.930268
155 male dem 0.14090576 0.14990194 0.11592639 0.04157842 3 68.272856
156 male repub 0.14181546 0.15085952 0.11669672 0.04187811 32 2.023480
157 female dem 0.14273006 0.15182212 0.11747150 0.04217987 4 65.455334
158 female repub 0.14364957 0.15278977 0.11825073 0.04248371 32 1.930268
159 male dem 0.14457400 0.15376246 0.11903443 0.04278964 3 68.272856
160 male repub 0.14550337 0.15474021 0.11982262 0.04309767 32 2.023480
161 female dem 0.14643769 0.15572303 0.12061531 0.04340781 4 65.455334
162 female repub 0.14737697 0.15671094 0.12141253 0.04372009 32 1.930268
163 male dem 0.14832124 0.15770395 0.12221428 0.04403451 3 68.272856
164 male repub 0.14927049 0.15870206 0.12302058 0.04435109 32 2.023480
165 female dem 0.15022475 0.15970530 0.12383146 0.04466984 4 65.455334
166 female repub 0.15118403 0.16071366 0.12464692 0.04499077 32 1.930268
167 male dem 0.15214833 0.16172717 0.12546698 0.04531389 3 68.272856
168 male repub 0.15311767 0.16274582 0.12629165 0.04563923 32 2.023480
169 female dem 0.15409207 0.16376964 0.12712096 0.04596679 4 65.455334
170 female repub 0.15507154 0.16479864 0.12795492 0.04629658 32 1.930268
171 male dem 0.15605608 0.16583281 0.12879354 0.04662863 3 68.272856
172 male repub 0.15704571 0.16687218 0.12963684 0.04696294 32 2.023480
173 female dem 0.15804044 0.16791676 0.13048484 0.04729953 4 65.455334
174 female repub 0.15904028 0.16896654 0.13133755 0.04763841 32 1.930268
175 male dem 0.16004524 0.17002155 0.13219498 0.04797960 3 68.272856
176 male repub 0.16105534 0.17108179 0.13305715 0.04832310 32 2.023480
177 female dem 0.16207059 0.17214727 0.13392407 0.04866894 4 65.455334
178 female repub 0.16309099 0.17321800 0.13479577 0.04901713 32 1.930268
179 male dem 0.16411655 0.17429398 0.13567225 0.04936768 3 68.272856
180 male repub 0.16514730 0.17537523 0.13655353 0.04972060 32 2.023480
181 female dem 0.16618323 0.17646176 0.13743963 0.05007592 4 65.455334
182 female repub 0.16722435 0.17755357 0.13833055 0.05043364 32 1.930268
183 male dem 0.16827068 0.17865066 0.13922632 0.05079377 3 68.272856
184 male repub 0.16932223 0.17975306 0.14012694 0.05115635 32 2.023480
185 female dem 0.17037900 0.18086076 0.14103244 0.05152136 4 65.455334
186 female repub 0.17144101 0.18197377 0.14194282 0.05188884 32 1.930268
187 male dem 0.17250826 0.18309210 0.14285810 0.05225880 3 68.272856
188 male repub 0.17358076 0.18421575 0.14377829 0.05263125 32 2.023480
189 female dem 0.17465853 0.18534474 0.14470341 0.05300621 4 65.455334
190 female repub 0.17574156 0.18647906 0.14563347 0.05338368 32 1.930268
191 male dem 0.17682987 0.18761873 0.14656849 0.05376369 3 68.272856
192 male repub 0.17792346 0.18876375 0.14750847 0.05414625 32 2.023480
193 female dem 0.17902235 0.18991412 0.14845343 0.05453138 4 65.455334
194 female repub 0.18012653 0.19106985 0.14940338 0.05491909 32 1.930268
195 male dem 0.18123602 0.19223094 0.15035834 0.05530939 3 68.272856
196 male repub 0.18235083 0.19339740 0.15131831 0.05570230 32 2.023480
197 female dem 0.18347096 0.19456924 0.15228332 0.05609784 4 65.455334
198 female repub 0.18459641 0.19574645 0.15325337 0.05649602 32 1.930268
199 male dem 0.18572720 0.19692905 0.15422847 0.05689685 3 68.272856
200 male repub 0.18686333 0.19811703 0.15520864 0.05730036 32 2.023480
201 female dem 0.18800480 0.19931039 0.15619389 0.05770655 4 65.455334
202 female repub 0.18915162 0.20050915 0.15718424 0.05811544 32 1.930268
203 male dem 0.19030380 0.20171330 0.15817968 0.05852706 3 68.272856
204 male repub 0.19146134 0.20292285 0.15918023 0.05894140 32 2.023480
205 female dem 0.19262425 0.20413780 0.16018592 0.05935849 4 65.455334
206 female repub 0.19379253 0.20535814 0.16119673 0.05977835 32 1.930268
207 male dem 0.19496618 0.20658389 0.16221270 0.06020099 3 68.272856
208 male repub 0.19614521 0.20781504 0.16323382 0.06062642 32 2.023480
209 female dem 0.19732962 0.20905159 0.16426010 0.06105466 4 65.455334
210 female repub 0.19851942 0.21029355 0.16529157 0.06148573 32 1.930268
211 male dem 0.19971461 0.21154091 0.16632822 0.06191964 3 68.272856
212 male repub 0.20091519 0.21279368 0.16737008 0.06235641 32 2.023480
213 female dem 0.20212116 0.21405186 0.16841714 0.06279606 4 65.455334
214 female repub 0.20333253 0.21531544 0.16946941 0.06323860 32 1.930268
215 male dem 0.20454930 0.21658442 0.17052692 0.06368404 3 68.272856
216 male repub 0.20577147 0.21785880 0.17158965 0.06413241 32 2.023480
217 female dem 0.20699904 0.21913859 0.17265764 0.06458371 4 65.455334
218 female repub 0.20823201 0.22042377 0.17373087 0.06503797 32 1.930268
219 male dem 0.20947039 0.22171435 0.17480937 0.06549520 3 68.272856
220 male repub 0.21071418 0.22301033 0.17589314 0.06595542 32 2.023480
221 female dem 0.21196337 0.22431170 0.17698218 0.06641865 4 65.455334
222 female repub 0.21321796 0.22561845 0.17807652 0.06688489 32 1.930268
223 male dem 0.21447796 0.22693060 0.17917614 0.06735417 3 68.272856
224 male repub 0.21574336 0.22824812 0.18028107 0.06782651 32 2.023480
225 female dem 0.21701417 0.22957102 0.18139130 0.06830191 4 65.455334
226 female repub 0.21829038 0.23089930 0.18250685 0.06878040 32 1.930268
227 male dem 0.21957199 0.23223294 0.18362772 0.06926199 3 68.272856
228 male repub 0.22085899 0.23357195 0.18475392 0.06974671 32 2.023480
229 female dem 0.22215140 0.23491632 0.18588545 0.07023455 4 65.455334
230 female repub 0.22344919 0.23626604 0.18702232 0.07072556 32 1.930268
231 male dem 0.22475238 0.23762110 0.18816454 0.07121973 3 68.272856
232 male repub 0.22606096 0.23898151 0.18931211 0.07171708 32 2.023480
233 female dem 0.22737492 0.24034725 0.19046504 0.07221765 4 65.455334
234 female repub 0.22869426 0.24171831 0.19162333 0.07272143 32 1.930268
235 male dem 0.23001898 0.24309469 0.19278699 0.07322844 3 68.272856
236 male repub 0.23134907 0.24447638 0.19395601 0.07373872 32 2.023480
237 female dem 0.23268452 0.24586338 0.19513042 0.07425226 4 65.455334
238 female repub 0.23402534 0.24725567 0.19631020 0.07476909 32 1.930268
239 male dem 0.23537152 0.24865324 0.19749536 0.07528922 3 68.272856
240 male repub 0.23672304 0.25005609 0.19868591 0.07581268 32 2.023480
241 female dem 0.23807991 0.25146421 0.19988185 0.07633947 4 65.455334
242 female repub 0.23944212 0.25287758 0.20108318 0.07686963 32 1.930268
243 male dem 0.24080965 0.25429619 0.20228991 0.07740315 3 68.272856
244 male repub 0.24218252 0.25572004 0.20350203 0.07794007 32 2.023480
245 female dem 0.24356069 0.25714911 0.20471955 0.07848039 4 65.455334
246 female repub 0.24494418 0.25858340 0.20594248 0.07902414 32 1.930268
247 male dem 0.24633296 0.26002288 0.20717080 0.07957133 3 68.272856
248 male repub 0.24772703 0.26146755 0.20840453 0.08012198 32 2.023480
249 female dem 0.24912639 0.26291740 0.20964367 0.08067610 4 65.455334
250 female repub 0.25053102 0.26437241 0.21088820 0.08123372 32 1.930268
251 male dem 0.25194091 0.26583256 0.21213815 0.08179485 3 68.272856
252 male repub 0.25335605 0.26729785 0.21339350 0.08235951 32 2.023480
253 female dem 0.25477644 0.26876826 0.21465425 0.08292772 4 65.455334
254 female repub 0.25620205 0.27024378 0.21592041 0.08349949 32 1.930268
255 male dem 0.25763289 0.27172439 0.21719197 0.08407483 3 68.272856
256 male repub 0.25906893 0.27321007 0.21846893 0.08465378 32 2.023480
257 female dem 0.26051016 0.27470081 0.21975129 0.08523635 4 65.455334
258 female repub 0.26195658 0.27619659 0.22103905 0.08582254 32 1.930268
259 male dem 0.26340818 0.27769740 0.22233221 0.08641239 3 68.272856
260 male repub 0.26486492 0.27920322 0.22363076 0.08700591 32 2.023480
261 female dem 0.26632681 0.28071403 0.22493470 0.08760311 4 65.455334
262 female repub 0.26779384 0.28222981 0.22624403 0.08820401 32 1.930268
263 male dem 0.26926597 0.28375055 0.22755874 0.08880864 3 68.272856
264 male repub 0.27074321 0.28527623 0.22887883 0.08941700 32 2.023480
265 female dem 0.27222553 0.28680683 0.23020430 0.09002912 4 65.455334
266 female repub 0.27371292 0.28834232 0.23153514 0.09064501 32 1.930268
267 male dem 0.27520536 0.28988270 0.23287134 0.09126469 3 68.272856
268 male repub 0.27670285 0.29142793 0.23421291 0.09188818 32 2.023480
269 female dem 0.27820535 0.29297801 0.23555983 0.09251550 4 65.455334
270 female repub 0.27971286 0.29453290 0.23691210 0.09314666 32 1.930268
271 male dem 0.28122535 0.29609258 0.23826972 0.09378168 3 68.272856
272 male repub 0.28274281 0.29765704 0.23963267 0.09442058 32 2.023480
273 female dem 0.28426522 0.29922626 0.24100095 0.09506337 4 65.455334
274 female repub 0.28579256 0.30080020 0.24237455 0.09571008 32 1.930268
275 male dem 0.28732481 0.30237885 0.24375347 0.09636072 3 68.272856
276 male repub 0.28886196 0.30396218 0.24513769 0.09701531 32 2.023480
277 female dem 0.29040398 0.30555018 0.24652722 0.09767387 4 65.455334
278 female repub 0.29195085 0.30714280 0.24792203 0.09833641 32 1.930268
279 male dem 0.29350255 0.30874004 0.24932212 0.09900294 3 68.272856
280 male repub 0.29505906 0.31034187 0.25072748 0.09967350 32 2.023480
281 female dem 0.29662036 0.31194825 0.25213811 0.10034810 4 65.455334
282 female repub 0.29818643 0.31355917 0.25355398 0.10102674 32 1.930268
283 male dem 0.29975725 0.31517460 0.25497510 0.10170946 3 68.272856
284 male repub 0.30133278 0.31679450 0.25640144 0.10239627 32 2.023480
285 female dem 0.30291301 0.31841887 0.25783300 0.10308718 4 65.455334
286 female repub 0.30449792 0.32004766 0.25926977 0.10378221 32 1.930268
287 male dem 0.30608748 0.32168085 0.26071173 0.10448139 3 68.272856
288 male repub 0.30768167 0.32331841 0.26215888 0.10518472 32 2.023480
289 female dem 0.30928046 0.32496031 0.26361119 0.10589222 4 65.455334
290 female repub 0.31088383 0.32660653 0.26506865 0.10660392 32 1.930268
291 male dem 0.31249175 0.32825703 0.26653126 0.10731983 3 68.272856
292 male repub 0.31410419 0.32991179 0.26799900 0.10803997 32 2.023480
293 female dem 0.31572113 0.33157077 0.26947185 0.10876434 4 65.455334
294 female repub 0.31734255 0.33323394 0.27094979 0.10949298 32 1.930268
295 male dem 0.31896841 0.33490128 0.27243282 0.11022590 3 68.272856
296 male repub 0.32059869 0.33657275 0.27392092 0.11096311 32 2.023480
297 female dem 0.32223336 0.33824832 0.27541407 0.11170463 4 65.455334
298 female repub 0.32387239 0.33992795 0.27691225 0.11245048 32 1.930268
299 male dem 0.32551575 0.34161162 0.27841545 0.11320068 3 68.272856
300 male repub 0.32716342 0.34329929 0.27992366 0.11395523 32 2.023480
301 female dem 0.32881536 0.34499093 0.28143684 0.11471417 4 65.455334
302 female repub 0.33047155 0.34668651 0.28295500 0.11547750 32 1.930268
303 male dem 0.33213195 0.34838599 0.28447810 0.11624525 3 68.272856
304 male repub 0.33379653 0.35008933 0.28600612 0.11701742 32 2.023480
305 female dem 0.33546527 0.35179651 0.28753906 0.11779404 4 65.455334
306 female repub 0.33713813 0.35350748 0.28907689 0.11857512 32 1.930268
307 male dem 0.33881507 0.35522221 0.29061959 0.11936069 3 68.272856
308 male repub 0.34049607 0.35694067 0.29216713 0.12015074 32 2.023480
309 female dem 0.34218110 0.35866282 0.29371951 0.12094531 4 65.455334
310 female repub 0.34387011 0.36038862 0.29527669 0.12174440 32 1.930268
311 male dem 0.34556309 0.36211804 0.29683866 0.12254804 3 68.272856
312 male repub 0.34725998 0.36385103 0.29840539 0.12335624 32 2.023480
313 female dem 0.34896077 0.36558756 0.29997686 0.12416901 4 65.455334
314 female repub 0.35066541 0.36732760 0.30155305 0.12498637 32 1.930268
315 male dem 0.35237387 0.36907110 0.30313394 0.12580835 3 68.272856
316 male repub 0.35408612 0.37081803 0.30471950 0.12663494 32 2.023480
317 female dem 0.35580212 0.37256834 0.30630971 0.12746618 4 65.455334
318 female repub 0.35752183 0.37432199 0.30790454 0.12830207 32 1.930268
319 male dem 0.35924521 0.37607896 0.30950397 0.12914263 3 68.272856
320 male repub 0.36097224 0.37783919 0.31110797 0.12998787 32 2.023480
321 female dem 0.36270286 0.37960265 0.31271653 0.13083782 4 65.455334
322 female repub 0.36443706 0.38136929 0.31432960 0.13169248 32 1.930268
323 male dem 0.36617478 0.38313908 0.31594717 0.13255188 3 68.272856
324 male repub 0.36791599 0.38491197 0.31756921 0.13341602 32 2.023480
325 female dem 0.36966065 0.38668792 0.31919569 0.13428492 4 65.455334
326 female repub 0.37140872 0.38846689 0.32082658 0.13515860 32 1.930268
327 male dem 0.37316017 0.39024883 0.32246186 0.13603707 3 68.272856
328 male repub 0.37491495 0.39203371 0.32410150 0.13692034 32 2.023480
329 female dem 0.37667302 0.39382148 0.32574546 0.13780844 4 65.455334
330 female repub 0.37843435 0.39561210 0.32739373 0.13870137 32 1.930268
331 male dem 0.38019888 0.39740553 0.32904627 0.13959915 3 68.272856
332 male repub 0.38196659 0.39920171 0.33070304 0.14050179 32 2.023480
333 female dem 0.38373743 0.40100061 0.33236403 0.14140931 4 65.455334
334 female repub 0.38551136 0.40280218 0.33402919 0.14232172 32 1.930268
335 male dem 0.38728833 0.40460638 0.33569851 0.14323904 3 68.272856
336 male repub 0.38906831 0.40641315 0.33737193 0.14416127 32 2.023480
337 female dem 0.39085126 0.40822247 0.33904945 0.14508844 4 65.455334
338 female repub 0.39263712 0.41003428 0.34073101 0.14602055 32 1.930268
339 male dem 0.39442585 0.41184853 0.34241660 0.14695762 3 68.272856
340 male repub 0.39621743 0.41366518 0.34410617 0.14789967 32 2.023480
341 female dem 0.39801179 0.41548418 0.34579969 0.14884669 4 65.455334
342 female repub 0.39980889 0.41730549 0.34749713 0.14979872 32 1.930268
343 male dem 0.40160870 0.41912905 0.34919846 0.15075576 3 68.272856
344 male repub 0.40341116 0.42095483 0.35090364 0.15171782 32 2.023480
345 female dem 0.40521623 0.42278278 0.35261263 0.15268491 4 65.455334
346 female repub 0.40702387 0.42461284 0.35432540 0.15365706 32 1.930268
347 male dem 0.40883403 0.42644497 0.35604192 0.15463426 3 68.272856
348 male repub 0.41064667 0.42827912 0.35776214 0.15561654 32 2.023480
349 female dem 0.41246174 0.43011524 0.35948604 0.15660390 4 65.455334
350 female repub 0.41427919 0.43195329 0.36121357 0.15759635 32 1.930268
351 male dem 0.41609897 0.43379321 0.36294470 0.15859391 3 68.272856
352 male repub 0.41792105 0.43563496 0.36467938 0.15959659 32 2.023480
353 female dem 0.41974537 0.43747849 0.36641759 0.16060440 4 65.455334
354 female repub 0.42157188 0.43932375 0.36815929 0.16161735 32 1.930268
355 male dem 0.42340055 0.44117068 0.36990443 0.16263545 3 68.272856
356 male repub 0.42523131 0.44301925 0.37165297 0.16365871 32 2.023480
357 female dem 0.42706413 0.44486940 0.37340489 0.16468715 4 65.455334
358 female repub 0.42889895 0.44672107 0.37516013 0.16572076 32 1.930268
359 male dem 0.43073573 0.44857422 0.37691866 0.16675957 3 68.272856
360 male repub 0.43257442 0.45042881 0.37868043 0.16780358 32 2.023480
361 female dem 0.43441496 0.45228477 0.38044542 0.16885280 4 65.455334
362 female repub 0.43625732 0.45414206 0.38221356 0.16990724 32 1.930268
363 male dem 0.43810144 0.45600062 0.38398484 0.17096692 3 68.272856
364 male repub 0.43994727 0.45786042 0.38575919 0.17203183 32 2.023480
365 female dem 0.44179476 0.45972138 0.38753659 0.17310199 4 65.455334
366 female repub 0.44364386 0.46158348 0.38931698 0.17417741 32 1.930268
367 male dem 0.44549453 0.46344664 0.39110034 0.17525809 3 68.272856
368 male repub 0.44734671 0.46531083 0.39288660 0.17634404 32 2.023480
369 female dem 0.44920035 0.46717598 0.39467574 0.17743528 4 65.455334
370 female repub 0.45105541 0.46904205 0.39646770 0.17853180 32 1.930268
371 male dem 0.45291182 0.47090899 0.39826245 0.17963363 3 68.272856
372 male repub 0.45476955 0.47277675 0.40005993 0.18074075 32 2.023480
373 female dem 0.45662854 0.47464526 0.40186011 0.18185319 4 65.455334
374 female repub 0.45848873 0.47651449 0.40366294 0.18297094 32 1.930268
375 male dem 0.46035008 0.47838437 0.40546838 0.18409402 3 68.272856
376 male repub 0.46221254 0.48025486 0.40727637 0.18522243 32 2.023480
377 female dem 0.46407606 0.48212591 0.40908688 0.18635618 4 65.455334
378 female repub 0.46594058 0.48399745 0.41089986 0.18749527 32 1.930268
379 male dem 0.46780605 0.48586945 0.41271526 0.18863971 3 68.272856
380 male repub 0.46967242 0.48774184 0.41453304 0.18978950 32 2.023480
381 female dem 0.47153964 0.48961457 0.41635315 0.19094465 4 65.455334
382 female repub 0.47340766 0.49148760 0.41817554 0.19210516 32 1.930268
383 male dem 0.47527642 0.49336086 0.42000017 0.19327104 3 68.272856
384 male repub 0.47714587 0.49523431 0.42182699 0.19444230 32 2.023480
385 female dem 0.47901597 0.49710790 0.42365595 0.19561893 4 65.455334
386 female repub 0.48088665 0.49898157 0.42548700 0.19680094 32 1.930268
387 male dem 0.48275787 0.50085526 0.42732010 0.19798834 3 68.272856
388 male repub 0.48462957 0.50272893 0.42915520 0.19918112 32 2.023480
389 female dem 0.48650170 0.50460253 0.43099225 0.20037930 4 65.455334
390 female repub 0.48837422 0.50647599 0.43283120 0.20158287 32 1.930268
391 male dem 0.49024706 0.50834928 0.43467200 0.20279183 3 68.272856
392 male repub 0.49212017 0.51022233 0.43651460 0.20400619 32 2.023480
393 female dem 0.49399350 0.51209509 0.43835896 0.20522595 4 65.455334
394 female repub 0.49586701 0.51396751 0.44020503 0.20645112 32 1.930268
395 male dem 0.49774062 0.51583954 0.44205275 0.20768168 3 68.272856
396 male repub 0.49961431 0.51771113 0.44390207 0.20891765 32 2.023480
397 female dem 0.50148800 0.51958222 0.44575295 0.21015903 4 65.455334
398 female repub 0.50336165 0.52145276 0.44760534 0.21140581 32 1.930268
399 male dem 0.50523521 0.52332270 0.44945918 0.21265799 3 68.272856
400 male repub 0.50710862 0.52519198 0.45131443 0.21391558 32 2.023480
401 female dem 0.50898183 0.52706056 0.45317103 0.21517857 4 65.455334
402 female repub 0.51085479 0.52892838 0.45502894 0.21644697 32 1.930268
403 male dem 0.51272744 0.53079540 0.45688809 0.21772077 3 68.272856
404 male repub 0.51459974 0.53266155 0.45874845 0.21899997 32 2.023480
405 female dem 0.51647162 0.53452678 0.46060997 0.22028457 4 65.455334
406 female repub 0.51834305 0.53639106 0.46247258 0.22157457 32 1.930268
407 male dem 0.52021396 0.53825431 0.46433623 0.22286997 3 68.272856
408 male repub 0.52208430 0.54011650 0.46620089 0.22417075 32 2.023480
409 female dem 0.52395402 0.54197757 0.46806649 0.22547693 4 65.455334
410 female repub 0.52582308 0.54383746 0.46993298 0.22678849 32 1.930268
411 male dem 0.52769141 0.54569614 0.47180031 0.22810543 3 68.272856
412 male repub 0.52955896 0.54755354 0.47366844 0.22942775 32 2.023480
413 female dem 0.53142569 0.54940962 0.47553730 0.23075545 4 65.455334
414 female repub 0.53329154 0.55126433 0.47740685 0.23208851 32 1.930268
415 male dem 0.53515645 0.55311761 0.47927703 0.23342694 3 68.272856
416 male repub 0.53702039 0.55496941 0.48114779 0.23477073 32 2.023480
417 female dem 0.53888329 0.55681969 0.48301908 0.23611987 4 65.455334
418 female repub 0.54074510 0.55866840 0.48489084 0.23747435 32 1.930268
419 male dem 0.54260578 0.56051548 0.48676303 0.23883418 3 68.272856
420 male repub 0.54446527 0.56236088 0.48863559 0.24019934 32 2.023480
421 female dem 0.54632352 0.56420456 0.49050847 0.24156983 4 65.455334
422 female repub 0.54818048 0.56604647 0.49238162 0.24294564 32 1.930268
423 male dem 0.55003610 0.56788655 0.49425498 0.24432676 3 68.272856
424 male repub 0.55189033 0.56972477 0.49612850 0.24571318 32 2.023480
425 female dem 0.55374312 0.57156106 0.49800214 0.24710490 4 65.455334
426 female repub 0.55559442 0.57339539 0.49987582 0.24850190 32 1.930268
427 male dem 0.55744417 0.57522769 0.50174951 0.24990418 3 68.272856
428 male repub 0.55929233 0.57705794 0.50362315 0.25131173 32 2.023480
429 female dem 0.56113885 0.57888607 0.50549669 0.25272453 4 65.455334
430 female repub 0.56298368 0.58071203 0.50737008 0.25414258 32 1.930268
431 male dem 0.56482677 0.58253580 0.50924326 0.25556586 3 68.272856
432 male repub 0.56666807 0.58435730 0.51111618 0.25699437 32 2.023480
433 female dem 0.56850753 0.58617651 0.51298878 0.25842809 4 65.455334
434 female repub 0.57034510 0.58799336 0.51486102 0.25986701 32 1.930268
435 male dem 0.57218073 0.58980783 0.51673285 0.26131113 3 68.272856
436 male repub 0.57401438 0.59161985 0.51860421 0.26276041 32 2.023480
437 female dem 0.57584599 0.59342938 0.52047504 0.26421486 4 65.455334
438 female repub 0.57767553 0.59523638 0.52234530 0.26567446 32 1.930268
439 male dem 0.57950293 0.59704081 0.52421493 0.26713920 3 68.272856
440 male repub 0.58132816 0.59884261 0.52608389 0.26860906 32 2.023480
441 female dem 0.58315117 0.60064174 0.52795211 0.27008402 4 65.455334
442 female repub 0.58497190 0.60243816 0.52981955 0.27156408 32 1.930268
443 male dem 0.58679032 0.60423183 0.53168616 0.27304921 3 68.272856
444 male repub 0.58860637 0.60602269 0.53355188 0.27453940 32 2.023480
445 female dem 0.59042001 0.60781071 0.53541667 0.27603464 4 65.455334
446 female repub 0.59223120 0.60959585 0.53728046 0.27753491 32 1.930268
447 male dem 0.59403988 0.61137805 0.53914321 0.27904019 3 68.272856
448 male repub 0.59584602 0.61315728 0.54100487 0.28055046 32 2.023480
449 female dem 0.59764956 0.61493350 0.54286539 0.28206571 4 65.455334
450 female repub 0.59945047 0.61670665 0.54472471 0.28358591 32 1.930268
451 male dem 0.60124869 0.61847671 0.54658278 0.28511106 3 68.272856
452 male repub 0.60304419 0.62024363 0.54843956 0.28664112 32 2.023480
453 female dem 0.60483691 0.62200737 0.55029499 0.28817609 4 65.455334
454 female repub 0.60662682 0.62376788 0.55214902 0.28971594 32 1.930268
455 male dem 0.60841387 0.62552513 0.55400160 0.29126065 3 68.272856
456 male repub 0.61019802 0.62727908 0.55585268 0.29281020 32 2.023480
457 female dem 0.61197922 0.62902968 0.55770222 0.29436457 4 65.455334
458 female repub 0.61375744 0.63077690 0.55955015 0.29592374 32 1.930268
459 male dem 0.61553263 0.63252070 0.56139644 0.29748769 3 68.272856
460 male repub 0.61730475 0.63426104 0.56324103 0.29905639 32 2.023480
461 female dem 0.61907375 0.63599788 0.56508387 0.30062982 4 65.455334
462 female repub 0.62083960 0.63773119 0.56692491 0.30220796 32 1.930268
463 male dem 0.62260225 0.63946092 0.56876411 0.30379079 3 68.272856
464 male repub 0.62436166 0.64118703 0.57060142 0.30537828 32 2.023480
465 female dem 0.62611780 0.64290950 0.57243677 0.30697041 4 65.455334
466 female repub 0.62787063 0.64462828 0.57427014 0.30856715 32 1.930268
467 male dem 0.62962009 0.64634334 0.57610147 0.31016848 3 68.272856
468 male repub 0.63136616 0.64805464 0.57793071 0.31177437 32 2.023480
469 female dem 0.63310880 0.64976215 0.57975782 0.31338480 4 65.455334
470 female repub 0.63484796 0.65146583 0.58158274 0.31499974 32 1.930268
471 male dem 0.63658361 0.65316564 0.58340543 0.31661917 3 68.272856
472 male repub 0.63831571 0.65486156 0.58522584 0.31824305 32 2.023480
473 female dem 0.64004423 0.65655355 0.58704393 0.31987136 4 65.455334
474 female repub 0.64176911 0.65824157 0.58885965 0.32150408 32 1.930268
475 male dem 0.64349034 0.65992559 0.59067295 0.32314117 3 68.272856
476 male repub 0.64520787 0.66160557 0.59248379 0.32478260 32 2.023480
477 female dem 0.64692166 0.66328150 0.59429212 0.32642836 4 65.455334
478 female repub 0.64863169 0.66495332 0.59609790 0.32807840 32 1.930268
479 male dem 0.65033791 0.66662102 0.59790108 0.32973269 3 68.272856
480 male repub 0.65204028 0.66828456 0.59970161 0.33139122 32 2.023480
481 female dem 0.65373879 0.66994391 0.60149946 0.33305394 4 65.455334
482 female repub 0.65543338 0.67159903 0.60329457 0.33472083 32 1.930268
483 male dem 0.65712403 0.67324990 0.60508690 0.33639185 3 68.272856
484 male repub 0.65881070 0.67489650 0.60687641 0.33806698 32 2.023480
485 female dem 0.66049336 0.67653878 0.60866306 0.33974618 4 65.455334
486 female repub 0.66217198 0.67817672 0.61044680 0.34142941 32 1.930268
487 male dem 0.66384653 0.67981029 0.61222759 0.34311665 3 68.272856
488 male repub 0.66551696 0.68143946 0.61400539 0.34480787 32 2.023480
489 female dem 0.66718326 0.68306421 0.61578015 0.34650302 4 65.455334
490 female repub 0.66884539 0.68468451 0.61755184 0.34820208 32 1.930268
491 male dem 0.67050331 0.68630033 0.61932040 0.34990500 3 68.272856
492 male repub 0.67215700 0.68791164 0.62108581 0.35161177 32 2.023480
493 female dem 0.67380643 0.68951842 0.62284801 0.35332233 4 65.455334
494 female repub 0.67545157 0.69112065 0.62460697 0.35503666 32 1.930268
495 male dem 0.67709239 0.69271828 0.62636265 0.35675472 3 68.272856
496 male repub 0.67872886 0.69431131 0.62811501 0.35847647 32 2.023480
497 female dem 0.68036095 0.69589971 0.62986400 0.36020188 4 65.455334
498 female repub 0.68198863 0.69748345 0.63160959 0.36193090 32 1.930268
499 male dem 0.68361188 0.69906251 0.63335175 0.36366351 3 68.272856
500 male repub 0.68523067 0.70063686 0.63509042 0.36539966 32 2.023480
501 female dem 0.68684497 0.70220649 0.63682558 0.36713932 4 65.455334
502 female repub 0.68845476 0.70377136 0.63855718 0.36888245 32 1.930268
503 male dem 0.69006000 0.70533147 0.64028519 0.37062901 3 68.272856
504 male repub 0.69166068 0.70688678 0.64200957 0.37237895 32 2.023480
505 female dem 0.69325676 0.70843727 0.64373028 0.37413225 4 65.455334
506 female repub 0.69484823 0.70998293 0.64544729 0.37588886 32 1.930268
507 male dem 0.69643506 0.71152373 0.64716056 0.37764874 3 68.272856
508 male repub 0.69801722 0.71305965 0.64887006 0.37941185 32 2.023480
509 female dem 0.69959469 0.71459067 0.65057574 0.38117815 4 65.455334
510 female repub 0.70116745 0.71611678 0.65227758 0.38294760 32 1.930268
511 male dem 0.70273547 0.71763795 0.65397554 0.38472016 3 68.272856
512 male repub 0.70429874 0.71915417 0.65566958 0.38649578 32 2.023480
513 female dem 0.70585723 0.72066541 0.65735968 0.38827442 4 65.455334
514 female repub 0.70741091 0.72217167 0.65904580 0.39005605 32 1.930268
515 male dem 0.70895978 0.72367291 0.66072790 0.39184062 3 68.272856
516 male repub 0.71050379 0.72516913 0.66240595 0.39362808 32 2.023480
517 female dem 0.71204295 0.72666031 0.66407992 0.39541839 4 65.455334
518 female repub 0.71357722 0.72814643 0.66574978 0.39721151 32 1.930268
519 male dem 0.71510658 0.72962748 0.66741550 0.39900740 3 68.272856
520 male repub 0.71663103 0.73110344 0.66907704 0.40080601 32 2.023480
521 female dem 0.71815053 0.73257430 0.67073437 0.40260729 4 65.455334
522 female repub 0.71966507 0.73404003 0.67238747 0.40441120 32 1.930268
523 male dem 0.72117463 0.73550064 0.67403631 0.40621771 3 68.272856
524 male repub 0.72267919 0.73695609 0.67568084 0.40802675 32 2.023480
525 female dem 0.72417874 0.73840639 0.67732106 0.40983829 4 65.455334
526 female repub 0.72567326 0.73985151 0.67895692 0.41165228 32 1.930268
527 male dem 0.72716274 0.74129145 0.68058839 0.41346867 3 68.272856
528 male repub 0.72864715 0.74272619 0.68221546 0.41528742 32 2.023480
529 female dem 0.73012648 0.74415571 0.68383809 0.41710848 4 65.455334
530 female repub 0.73160072 0.74558002 0.68545625 0.41893181 32 1.930268
531 male dem 0.73306985 0.74699909 0.68706992 0.42075735 3 68.272856
532 male repub 0.73453385 0.74841292 0.68867908 0.42258506 32 2.023480
533 female dem 0.73599272 0.74982149 0.69028368 0.42441489 4 65.455334
534 female repub 0.73744643 0.75122480 0.69188372 0.42624680 32 1.930268
535 male dem 0.73889498 0.75262283 0.69347916 0.42808074 3 68.272856
536 male repub 0.74033836 0.75401558 0.69506999 0.42991665 32 2.023480
537 female dem 0.74177654 0.75540304 0.69665616 0.43175449 4 65.455334
538 female repub 0.74320952 0.75678519 0.69823767 0.43359422 32 1.930268
539 male dem 0.74463728 0.75816204 0.69981449 0.43543577 3 68.272856
540 male repub 0.74605982 0.75953357 0.70138659 0.43727911 32 2.023480
541 female dem 0.74747712 0.76089977 0.70295395 0.43912418 4 65.455334
542 female repub 0.74888918 0.76226064 0.70451655 0.44097094 32 1.930268
543 male dem 0.75029597 0.76361617 0.70607437 0.44281933 3 68.272856
544 male repub 0.75169750 0.76496635 0.70762738 0.44466931 32 2.023480
545 female dem 0.75309375 0.76631119 0.70917557 0.44652082 4 65.455334
546 female repub 0.75448471 0.76765066 0.71071891 0.44837382 32 1.930268
547 male dem 0.75587038 0.76898477 0.71225738 0.45022825 3 68.272856
548 male repub 0.75725074 0.77031352 0.71379097 0.45208406 32 2.023480
549 female dem 0.75862579 0.77163689 0.71531965 0.45394121 4 65.455334
550 female repub 0.75999552 0.77295488 0.71684340 0.45579964 32 1.930268
551 male dem 0.76135993 0.77426749 0.71836221 0.45765930 3 68.272856
552 male repub 0.76271899 0.77557472 0.71987606 0.45952015 32 2.023480
553 female dem 0.76407272 0.77687656 0.72138492 0.46138212 4 65.455334
554 female repub 0.76542110 0.77817300 0.72288879 0.46324517 32 1.930268
555 male dem 0.76676412 0.77946405 0.72438764 0.46510925 3 68.272856
556 male repub 0.76810179 0.78074971 0.72588146 0.46697430 32 2.023480
557 female dem 0.76943409 0.78202996 0.72737022 0.46884028 4 65.455334
558 female repub 0.77076102 0.78330482 0.72885393 0.47070712 32 1.930268
559 male dem 0.77208257 0.78457427 0.73033255 0.47257479 3 68.272856
560 male repub 0.77339875 0.78583832 0.73180607 0.47444323 32 2.023480
561 female dem 0.77470954 0.78709696 0.73327449 0.47631238 4 65.455334
562 female repub 0.77601495 0.78835020 0.73473778 0.47818220 32 1.930268
563 male dem 0.77731496 0.78959804 0.73619592 0.48005262 3 68.272856
564 male repub 0.77860959 0.79084047 0.73764892 0.48192361 32 2.023480
565 female dem 0.77989882 0.79207749 0.73909675 0.48379510 4 65.455334
566 female repub 0.78118265 0.79330911 0.74053940 0.48566705 32 1.930268
567 male dem 0.78246108 0.79453533 0.74197685 0.48753940 3 68.272856
568 male repub 0.78373411 0.79575615 0.74340911 0.48941210 32 2.023480
569 female dem 0.78500174 0.79697156 0.74483614 0.49128510 4 65.455334
570 female repub 0.78626396 0.79818158 0.74625795 0.49315834 32 1.930268
571 male dem 0.78752078 0.79938620 0.74767452 0.49503177 3 68.272856
572 male repub 0.78877220 0.80058543 0.74908584 0.49690535 32 2.023480
573 female dem 0.79001821 0.80177926 0.75049190 0.49877901 4 65.455334
574 female repub 0.79125881 0.80296771 0.75189270 0.50065270 32 1.930268
575 male dem 0.79249401 0.80415077 0.75328821 0.50252638 3 68.272856
576 male repub 0.79372381 0.80532846 0.75467843 0.50439999 32 2.023480
577 female dem 0.79494820 0.80650076 0.75606336 0.50627347 4 65.455334
578 female repub 0.79616719 0.80766769 0.75744298 0.50814677 32 1.930268
579 male dem 0.79738078 0.80882925 0.75881729 0.51001985 3 68.272856
580 male repub 0.79858898 0.80998545 0.76018628 0.51189265 32 2.023480
581 female dem 0.79979178 0.81113629 0.76154993 0.51376511 4 65.455334
582 female repub 0.80098918 0.81228177 0.76290826 0.51563718 32 1.930268
583 male dem 0.80218120 0.81342190 0.76426124 0.51750882 3 68.272856
584 male repub 0.80336783 0.81455669 0.76560887 0.51937997 32 2.023480
585 female dem 0.80454908 0.81568614 0.76695114 0.52125057 4 65.455334
586 female repub 0.80572494 0.81681026 0.76828806 0.52312058 32 1.930268
587 male dem 0.80689543 0.81792905 0.76961961 0.52498993 3 68.272856
588 male repub 0.80806055 0.81904253 0.77094579 0.52685859 32 2.023480
589 female dem 0.80922030 0.82015069 0.77226659 0.52872650 4 65.455334
590 female repub 0.81037468 0.82125354 0.77358202 0.53059360 32 1.930268
591 male dem 0.81152371 0.82235110 0.77489206 0.53245985 3 68.272856
592 male repub 0.81266738 0.82344337 0.77619672 0.53432518 32 2.023480
593 female dem 0.81380571 0.82453036 0.77749598 0.53618956 4 65.455334
594 female repub 0.81493870 0.82561207 0.77878985 0.53805293 32 1.930268
595 male dem 0.81606635 0.82668851 0.78007833 0.53991524 3 68.272856
596 male repub 0.81718867 0.82775970 0.78136141 0.54177643 32 2.023480
597 female dem 0.81830566 0.82882563 0.78263908 0.54363645 4 65.455334
598 female repub 0.81941734 0.82988633 0.78391136 0.54549526 32 1.930268
599 male dem 0.82052371 0.83094179 0.78517823 0.54735281 3 68.272856
600 male repub 0.82162478 0.83199203 0.78643970 0.54920903 32 2.023480
601 female dem 0.82272055 0.83303706 0.78769577 0.55106389 4 65.455334
602 female repub 0.82381103 0.83407688 0.78894643 0.55291732 32 1.930268
603 male dem 0.82489624 0.83511151 0.79019168 0.55476929 3 68.272856
604 male repub 0.82597617 0.83614095 0.79143153 0.55661974 32 2.023480
605 female dem 0.82705083 0.83716522 0.79266598 0.55846862 4 65.455334
606 female repub 0.82812025 0.83818433 0.79389502 0.56031587 32 1.930268
607 male dem 0.82918441 0.83919828 0.79511866 0.56216146 3 68.272856
608 male repub 0.83024334 0.84020709 0.79633690 0.56400533 32 2.023480
609 female dem 0.83129704 0.84121077 0.79754974 0.56584743 4 65.455334
610 female repub 0.83234551 0.84220933 0.79875718 0.56768772 32 1.930268
611 male dem 0.83338878 0.84320279 0.79995923 0.56952614 3 68.272856
612 male repub 0.83442685 0.84419114 0.80115588 0.57136264 32 2.023480
613 female dem 0.83545973 0.84517441 0.80234714 0.57319718 4 65.455334
614 female repub 0.83648742 0.84615260 0.80353302 0.57502971 32 1.930268
615 male dem 0.83750995 0.84712573 0.80471352 0.57686018 3 68.272856
616 male repub 0.83852731 0.84809381 0.80588863 0.57868854 32 2.023480
617 female dem 0.83953953 0.84905685 0.80705837 0.58051474 4 65.455334
618 female repub 0.84054661 0.85001487 0.80822274 0.58233874 32 1.930268
619 male dem 0.84154856 0.85096787 0.80938174 0.58416050 3 68.272856
620 male repub 0.84254539 0.85191587 0.81053538 0.58597995 32 2.023480
621 female dem 0.84353712 0.85285889 0.81168366 0.58779706 4 65.455334
622 female repub 0.84452375 0.85379693 0.81282658 0.58961179 32 1.930268
623 male dem 0.84550530 0.85473001 0.81396417 0.59142407 3 68.272856
624 male repub 0.84648179 0.85565814 0.81509641 0.59323388 32 2.023480
625 female dem 0.84745321 0.85658134 0.81622331 0.59504116 4 65.455334
626 female repub 0.84841959 0.85749961 0.81734489 0.59684586 32 1.930268
627 male dem 0.84938093 0.85841298 0.81846114 0.59864795 3 68.272856
628 male repub 0.85033725 0.85932145 0.81957208 0.60044737 32 2.023480
629 female dem 0.85128857 0.86022504 0.82067771 0.60224409 4 65.455334
630 female repub 0.85223488 0.86112377 0.82177803 0.60403805 32 1.930268
631 male dem 0.85317622 0.86201765 0.82287307 0.60582922 3 68.272856
632 male repub 0.85411258 0.86290669 0.82396281 0.60761755 32 2.023480
633 female dem 0.85504399 0.86379090 0.82504728 0.60940300 4 65.455334
634 female repub 0.85597045 0.86467031 0.82612648 0.61118552 32 1.930268
635 male dem 0.85689198 0.86554492 0.82720041 0.61296508 3 68.272856
636 male repub 0.85780860 0.86641475 0.82826909 0.61474162 32 2.023480
637 female dem 0.85872031 0.86727982 0.82933252 0.61651511 4 65.455334
638 female repub 0.85962714 0.86814014 0.83039072 0.61828551 32 1.930268
639 male dem 0.86052909 0.86899573 0.83144369 0.62005277 3 68.272856
640 male repub 0.86142617 0.86984659 0.83249144 0.62181685 32 2.023480
641 female dem 0.86231841 0.87069276 0.83353398 0.62357771 4 65.455334
642 female repub 0.86320582 0.87153423 0.83457132 0.62533532 32 1.930268
643 male dem 0.86408841 0.87237103 0.83560347 0.62708962 3 68.272856
644 male repub 0.86496620 0.87320317 0.83663045 0.62884059 32 2.023480
645 female dem 0.86583919 0.87403067 0.83765225 0.63058818 4 65.455334
646 female repub 0.86670742 0.87485354 0.83866890 0.63233235 32 1.930268
647 male dem 0.86757088 0.87567181 0.83968040 0.63407307 3 68.272856
648 male repub 0.86842960 0.87648548 0.84068676 0.63581029 32 2.023480
649 female dem 0.86928359 0.87729457 0.84168799 0.63754398 4 65.455334
650 female repub 0.87013286 0.87809909 0.84268411 0.63927409 32 1.930268
651 male dem 0.87097744 0.87889907 0.84367513 0.64100060 3 68.272856
652 male repub 0.87181734 0.87969452 0.84466105 0.64272347 32 2.023480
653 female dem 0.87265256 0.88048546 0.84564190 0.64444265 4 65.455334
654 female repub 0.87348313 0.88127189 0.84661767 0.64615811 32 1.930268
655 male dem 0.87430907 0.88205385 0.84758839 0.64786982 3 68.272856
656 male repub 0.87513038 0.88283134 0.84855407 0.64957774 32 2.023480
657 female dem 0.87594709 0.88360438 0.84951471 0.65128184 4 65.455334
658 female repub 0.87675921 0.88437299 0.85047033 0.65298207 32 1.930268
659 male dem 0.87756676 0.88513718 0.85142095 0.65467841 3 68.272856
660 male repub 0.87836975 0.88589697 0.85236657 0.65637082 32 2.023480
661 female dem 0.87916820 0.88665238 0.85330721 0.65805927 4 65.455334
662 female repub 0.87996212 0.88740343 0.85424288 0.65974373 32 1.930268
663 male dem 0.88075154 0.88815013 0.85517359 0.66142415 3 68.272856
664 male repub 0.88153646 0.88889249 0.85609937 0.66310052 32 2.023480
665 female dem 0.88231690 0.88963054 0.85702021 0.66477279 4 65.455334
666 female repub 0.88309289 0.89036430 0.85793614 0.66644093 32 1.930268
667 male dem 0.88386443 0.89109377 0.85884717 0.66810492 3 68.272856
668 male repub 0.88463154 0.89181898 0.85975332 0.66976472 32 2.023480
669 female dem 0.88539425 0.89253994 0.86065458 0.67142031 4 65.455334
670 female repub 0.88615256 0.89325667 0.86155099 0.67307164 32 1.930268
671 male dem 0.88690650 0.89396919 0.86244256 0.67471870 3 68.272856
672 male repub 0.88765607 0.89467751 0.86332929 0.67636144 32 2.023480
673 female dem 0.88840131 0.89538166 0.86421121 0.67799986 4 65.455334
674 female repub 0.88914221 0.89608164 0.86508833 0.67963390 32 1.930268
675 male dem 0.88987881 0.89677748 0.86596066 0.68126355 3 68.272856
676 male repub 0.89061111 0.89746920 0.86682822 0.68288878 32 2.023480
677 female dem 0.89133914 0.89815680 0.86769102 0.68450956 4 65.455334
678 female repub 0.89206292 0.89884032 0.86854908 0.68612587 32 1.930268
679 male dem 0.89278245 0.89951976 0.86940241 0.68773767 3 68.272856
680 male repub 0.89349775 0.90019514 0.87025103 0.68934494 32 2.023480
681 female dem 0.89420885 0.90086648 0.87109495 0.69094765 4 65.455334
682 female repub 0.89491576 0.90153381 0.87193419 0.69254579 32 1.930268
683 male dem 0.89561850 0.90219712 0.87276876 0.69413932 3 68.272856
684 male repub 0.89631709 0.90285645 0.87359869 0.69572822 32 2.023480
685 female dem 0.89701153 0.90351182 0.87442398 0.69731246 4 65.455334
686 female repub 0.89770186 0.90416323 0.87524465 0.69889203 32 1.930268
687 male dem 0.89838808 0.90481070 0.87606072 0.70046689 3 68.272856
688 male repub 0.89907022 0.90545426 0.87687220 0.70203703 32 2.023480
689 female dem 0.89974828 0.90609392 0.87767911 0.70360242 4 65.455334
690 female repub 0.90042230 0.90672969 0.87848146 0.70516304 32 1.930268
691 male dem 0.90109229 0.90736161 0.87927928 0.70671887 3 68.272856
692 male repub 0.90175825 0.90798967 0.88007257 0.70826988 32 2.023480
693 female dem 0.90242022 0.90861391 0.88086136 0.70981606 4 65.455334
694 female repub 0.90307821 0.90923433 0.88164565 0.71135739 32 1.930268
695 male dem 0.90373224 0.90985096 0.88242547 0.71289384 3 68.272856
696 male repub 0.90438231 0.91046382 0.88320084 0.71442539 32 2.023480
697 female dem 0.90502847 0.91107291 0.88397176 0.71595203 4 65.455334
698 female repub 0.90567070 0.91167826 0.88473826 0.71747374 32 1.930268
699 male dem 0.90630905 0.91227989 0.88550035 0.71899049 3 68.272856
700 male repub 0.90694352 0.91287782 0.88625805 0.72050228 32 2.023480
701 female dem 0.90757413 0.91347205 0.88701138 0.72200907 4 65.455334
702 female repub 0.90820090 0.91406261 0.88776035 0.72351086 32 1.930268
703 male dem 0.90882385 0.91464952 0.88850497 0.72500762 3 68.272856
704 male repub 0.90944299 0.91523279 0.88924528 0.72649935 32 2.023480
705 female dem 0.91005834 0.91581244 0.88998128 0.72798602 4 65.455334
706 female repub 0.91066993 0.91638849 0.89071298 0.72946762 32 1.930268
707 male dem 0.91127775 0.91696096 0.89144042 0.73094413 3 68.272856
708 male repub 0.91188185 0.91752986 0.89216360 0.73241553 32 2.023480
709 female dem 0.91248222 0.91809521 0.89288254 0.73388183 4 65.455334
710 female repub 0.91307890 0.91865703 0.89359726 0.73534298 32 1.930268
711 male dem 0.91367189 0.91921533 0.89430777 0.73679900 3 68.272856
712 male repub 0.91426122 0.91977014 0.89501410 0.73824985 32 2.023480
713 female dem 0.91484689 0.92032146 0.89571625 0.73969554 4 65.455334
714 female repub 0.91542894 0.92086933 0.89641426 0.74113603 32 1.930268
715 male dem 0.91600737 0.92141374 0.89710813 0.74257133 3 68.272856
716 male repub 0.91658221 0.92195473 0.89779788 0.74400143 32 2.023480
717 female dem 0.91715347 0.92249231 0.89848353 0.74542630 4 65.455334
718 female repub 0.91772117 0.92302650 0.89916510 0.74684593 32 1.930268
719 male dem 0.91828533 0.92355731 0.89984260 0.74826033 3 68.272856
720 male repub 0.91884596 0.92408476 0.90051605 0.74966947 32 2.023480
721 female dem 0.91940308 0.92460886 0.90118548 0.75107335 4 65.455334
722 female repub 0.91995671 0.92512965 0.90185089 0.75247195 32 1.930268
723 male dem 0.92050686 0.92564712 0.90251230 0.75386527 3 68.272856
724 male repub 0.92105356 0.92616130 0.90316973 0.75525330 32 2.023480
725 female dem 0.92159682 0.92667221 0.90382321 0.75663603 4 65.455334
726 female repub 0.92213665 0.92717986 0.90447273 0.75801345 32 1.930268
727 male dem 0.92267308 0.92768427 0.90511834 0.75938555 3 68.272856
728 male repub 0.92320613 0.92818546 0.90576003 0.76075233 32 2.023480
729 female dem 0.92373580 0.92868344 0.90639784 0.76211378 4 65.455334
730 female repub 0.92426212 0.92917824 0.90703177 0.76346988 32 1.930268
731 male dem 0.92478510 0.92966985 0.90766184 0.76482065 3 68.272856
732 male repub 0.92530476 0.93015832 0.90828808 0.76616606 32 2.023480
733 female dem 0.92582113 0.93064364 0.90891049 0.76750611 4 65.455334
734 female repub 0.92633420 0.93112584 0.90952910 0.76884080 32 1.930268
735 male dem 0.92684401 0.93160493 0.91014393 0.77017013 3 68.272856
736 male repub 0.92735056 0.93208094 0.91075499 0.77149408 32 2.023480
737 female dem 0.92785388 0.93255387 0.91136229 0.77281266 4 65.455334
738 female repub 0.92835399 0.93302375 0.91196587 0.77412585 32 1.930268
739 male dem 0.92885089 0.93349058 0.91256572 0.77543366 3 68.272856
740 male repub 0.92934461 0.93395439 0.91316188 0.77673608 32 2.023480
741 female dem 0.92983516 0.93441520 0.91375436 0.77803311 4 65.455334
742 female repub 0.93032256 0.93487301 0.91434318 0.77932474 32 1.930268
743 male dem 0.93080683 0.93532785 0.91492835 0.78061098 3 68.272856
744 male repub 0.93128798 0.93577973 0.91550989 0.78189182 32 2.023480
745 female dem 0.93176603 0.93622867 0.91608782 0.78316726 4 65.455334
746 female repub 0.93224099 0.93667468 0.91666216 0.78443729 32 1.930268
747 male dem 0.93271289 0.93711779 0.91723292 0.78570193 3 68.272856
748 male repub 0.93318174 0.93755800 0.91780012 0.78696116 32 2.023480
749 female dem 0.93364755 0.93799533 0.91836379 0.78821498 4 65.455334
750 female repub 0.93411034 0.93842980 0.91892392 0.78946340 32 1.930268
751 male dem 0.93457014 0.93886142 0.91948056 0.79070641 3 68.272856
752 male repub 0.93502694 0.93929021 0.92003370 0.79194402 32 2.023480
753 female dem 0.93548078 0.93971619 0.92058337 0.79317623 4 65.455334
754 female repub 0.93593167 0.94013937 0.92112959 0.79440303 32 1.930268
755 male dem 0.93637962 0.94055977 0.92167237 0.79562443 3 68.272856
756 male repub 0.93682464 0.94097740 0.92221173 0.79684043 32 2.023480
757 female dem 0.93726677 0.94139228 0.92274769 0.79805103 4 65.455334
758 female repub 0.93770600 0.94180443 0.92328026 0.79925623 32 1.930268
759 male dem 0.93814237 0.94221385 0.92380946 0.80045604 3 68.272856
760 male repub 0.93857587 0.94262057 0.92433531 0.80165046 32 2.023480
761 female dem 0.93900654 0.94302460 0.92485783 0.80283949 4 65.455334
762 female repub 0.93943438 0.94342595 0.92537703 0.80402314 32 1.930268
763 male dem 0.93985941 0.94382465 0.92589293 0.80520140 3 68.272856
764 male repub 0.94028165 0.94422070 0.92640555 0.80637429 32 2.023480
765 female dem 0.94070111 0.94461412 0.92691490 0.80754180 4 65.455334
766 female repub 0.94111781 0.94500493 0.92742101 0.80870394 32 1.930268
767 male dem 0.94153177 0.94539315 0.92792388 0.80986071 3 68.272856
768 male repub 0.94194299 0.94577877 0.92842353 0.81101213 32 2.023480
769 female dem 0.94235150 0.94616184 0.92891999 0.81215819 4 65.455334
770 female repub 0.94275731 0.94654234 0.92941326 0.81329890 32 1.930268
771 male dem 0.94316043 0.94692031 0.92990337 0.81443427 3 68.272856
772 male repub 0.94356089 0.94729576 0.93039034 0.81556430 32 2.023480
773 female dem 0.94395869 0.94766869 0.93087417 0.81668899 4 65.455334
774 female repub 0.94435385 0.94803914 0.93135488 0.81780836 32 1.930268
775 male dem 0.94474639 0.94840710 0.93183250 0.81892241 3 68.272856
776 male repub 0.94513632 0.94877260 0.93230704 0.82003114 32 2.023480
777 female dem 0.94552366 0.94913565 0.93277851 0.82113457 4 65.455334
778 female repub 0.94590842 0.94949626 0.93324693 0.82223270 32 1.930268
779 male dem 0.94629062 0.94985445 0.93371232 0.82332554 3 68.272856
780 male repub 0.94667027 0.95021023 0.93417470 0.82441310 32 2.023480
781 female dem 0.94704738 0.95056362 0.93463407 0.82549538 4 65.455334
782 female repub 0.94742198 0.95091463 0.93509046 0.82657239 32 1.930268
783 male dem 0.94779407 0.95126328 0.93554389 0.82764415 3 68.272856
784 male repub 0.94816367 0.95160958 0.93599436 0.82871065 32 2.023480
785 female dem 0.94853080 0.95195354 0.93644190 0.82977191 4 65.455334
786 female repub 0.94889547 0.95229517 0.93688653 0.83082794 32 1.930268
787 male dem 0.94925770 0.95263450 0.93732825 0.83187874 3 68.272856
788 male repub 0.94961749 0.95297154 0.93776708 0.83292433 32 2.023480
789 female dem 0.94997486 0.95330629 0.93820304 0.83396472 4 65.455334
790 female repub 0.95032984 0.95363878 0.93863615 0.83499991 32 1.930268
791 male dem 0.95068242 0.95396901 0.93906642 0.83602991 3 68.272856
792 male repub 0.95103263 0.95429701 0.93949387 0.83705474 32 2.023480
793 female dem 0.95138048 0.95462278 0.93991851 0.83807440 4 65.455334
794 female repub 0.95172599 0.95494633 0.94034036 0.83908892 32 1.930268
795 male dem 0.95206917 0.95526769 0.94075944 0.84009828 3 68.272856
796 male repub 0.95241002 0.95558686 0.94117575 0.84110252 32 2.023480
797 female dem 0.95274858 0.95590386 0.94158933 0.84210163 4 65.455334
798 female repub 0.95308484 0.95621870 0.94200017 0.84309563 32 1.930268
799 male dem 0.95341883 0.95653140 0.94240830 0.84408454 3 68.272856
800 male repub 0.95375055 0.95684196 0.94281373 0.84506835 32 2.023480
801 female dem 0.95408003 0.95715040 0.94321648 0.84604709 4 65.455334
802 female repub 0.95440727 0.95745674 0.94361657 0.84702077 32 1.930268
803 male dem 0.95473229 0.95776098 0.94401400 0.84798940 3 68.272856
804 male repub 0.95505510 0.95806315 0.94440880 0.84895298 32 2.023480
805 female dem 0.95537572 0.95836324 0.94480097 0.84991154 4 65.455334
806 female repub 0.95569416 0.95866128 0.94519054 0.85086509 32 1.930268
807 male dem 0.95601042 0.95895728 0.94557752 0.85181363 3 68.272856
808 male repub 0.95632454 0.95925125 0.94596192 0.85275718 32 2.023480
809 female dem 0.95663651 0.95954320 0.94634376 0.85369576 4 65.455334
810 female repub 0.95694636 0.95983315 0.94672305 0.85462938 32 1.930268
811 male dem 0.95725409 0.96012111 0.94709981 0.85555804 3 68.272856
812 male repub 0.95755972 0.96040708 0.94747406 0.85648177 32 2.023480
813 female dem 0.95786326 0.96069109 0.94784581 0.85740058 4 65.455334
814 female repub 0.95816472 0.96097315 0.94821506 0.85831447 32 1.930268
815 male dem 0.95846412 0.96125326 0.94858185 0.85922347 3 68.272856
816 male repub 0.95876147 0.96153145 0.94894617 0.86012759 32 2.023480
817 female dem 0.95905678 0.96180771 0.94930806 0.86102685 4 65.455334
818 female repub 0.95935007 0.96208207 0.94966751 0.86192125 32 1.930268
819 male dem 0.95964134 0.96235454 0.95002455 0.86281081 3 68.272856
820 male repub 0.95993061 0.96262512 0.95037919 0.86369554 32 2.023480
821 female dem 0.96021790 0.96289384 0.95073144 0.86457547 4 65.455334
822 female repub 0.96050321 0.96316070 0.95108132 0.86545060 32 1.930268
823 male dem 0.96078656 0.96342571 0.95142885 0.86632095 3 68.272856
824 male repub 0.96106796 0.96368888 0.95177403 0.86718653 32 2.023480
825 female dem 0.96134742 0.96395023 0.95211688 0.86804736 4 65.455334
826 female repub 0.96162496 0.96420978 0.95245741 0.86890346 32 1.930268
827 male dem 0.96190058 0.96446752 0.95279565 0.86975484 3 68.272856
828 male repub 0.96217430 0.96472347 0.95313159 0.87060151 32 2.023480
829 female dem 0.96244613 0.96497765 0.95346526 0.87144349 4 65.455334
830 female repub 0.96271608 0.96523006 0.95379667 0.87228079 32 1.930268
831 male dem 0.96298416 0.96548072 0.95412583 0.87311343 3 68.272856
832 male repub 0.96325039 0.96572963 0.95445277 0.87394144 32 2.023480
833 female dem 0.96351478 0.96597682 0.95477748 0.87476481 4 65.455334
834 female repub 0.96377734 0.96622228 0.95509998 0.87558357 32 1.930268
835 male dem 0.96403808 0.96646603 0.95542029 0.87639773 3 68.272856
836 male repub 0.96429702 0.96670809 0.95573843 0.87720732 32 2.023480
837 female dem 0.96455415 0.96694845 0.95605440 0.87801234 4 65.455334
838 female repub 0.96480950 0.96718714 0.95636821 0.87881281 32 1.930268
839 male dem 0.96506308 0.96742417 0.95667989 0.87960875 3 68.272856
840 male repub 0.96531490 0.96765954 0.95698944 0.88040017 32 2.023480
841 female dem 0.96556497 0.96789326 0.95729687 0.88118709 4 65.455334
842 female repub 0.96581330 0.96812536 0.95760221 0.88196953 32 1.930268
843 male dem 0.96605990 0.96835583 0.95790546 0.88274750 3 68.272856
844 male repub 0.96630478 0.96858468 0.95820663 0.88352102 32 2.023480
845 female dem 0.96654796 0.96881194 0.95850574 0.88429011 4 65.455334
846 female repub 0.96678944 0.96903760 0.95880281 0.88505478 32 1.930268
847 male dem 0.96702924 0.96926168 0.95909784 0.88581505 3 68.272856
848 male repub 0.96726737 0.96948420 0.95939084 0.88657093 32 2.023480
849 female dem 0.96750384 0.96970515 0.95968183 0.88732245 4 65.455334
850 female repub 0.96773865 0.96992455 0.95997083 0.88806961 32 1.930268
851 male dem 0.96797182 0.97014241 0.96025784 0.88881245 3 68.272856
852 male repub 0.96820337 0.97035874 0.96054288 0.88955096 32 2.023480
853 female dem 0.96843329 0.97057356 0.96082595 0.89028518 4 65.455334
854 female repub 0.96866160 0.97078686 0.96110708 0.89101511 32 1.930268
855 male dem 0.96888832 0.97099866 0.96138627 0.89174078 3 68.272856
856 male repub 0.96911345 0.97120897 0.96166354 0.89246220 32 2.023480
857 female dem 0.96933700 0.97141780 0.96193889 0.89317939 4 65.455334
858 female repub 0.96955899 0.97162516 0.96221235 0.89389236 32 1.930268
859 male dem 0.96977941 0.97183106 0.96248392 0.89460114 3 68.272856
860 male repub 0.96999829 0.97203551 0.96275361 0.89530573 32 2.023480
861 female dem 0.97021564 0.97223852 0.96302143 0.89600617 4 65.455334
862 female repub 0.97043145 0.97244010 0.96328741 0.89670246 32 1.930268
863 male dem 0.97064576 0.97264025 0.96355154 0.89739462 3 68.272856
864 male repub 0.97085855 0.97283899 0.96381384 0.89808266 32 2.023480
865 female dem 0.97106985 0.97303633 0.96407433 0.89876662 4 65.455334
866 female repub 0.97127966 0.97323227 0.96433301 0.89944650 32 1.930268
867 male dem 0.97148799 0.97342683 0.96458990 0.90012232 3 68.272856
868 male repub 0.97169486 0.97362001 0.96484500 0.90079410 32 2.023480
869 female dem 0.97190027 0.97381182 0.96509834 0.90146186 4 65.455334
870 female repub 0.97210423 0.97400228 0.96534991 0.90212561 32 1.930268
871 male dem 0.97230675 0.97419139 0.96559973 0.90278537 3 68.272856
872 male repub 0.97250785 0.97437916 0.96584782 0.90344116 32 2.023480
873 female dem 0.97270752 0.97456560 0.96609418 0.90409299 4 65.455334
874 female repub 0.97290579 0.97475072 0.96633883 0.90474089 32 1.930268
875 male dem 0.97310265 0.97493452 0.96658177 0.90538487 3 68.272856
876 male repub 0.97329813 0.97511702 0.96682301 0.90602495 32 2.023480
877 female dem 0.97349222 0.97529823 0.96706258 0.90666115 4 65.455334
878 female repub 0.97368494 0.97547815 0.96730047 0.90729348 32 1.930268
879 male dem 0.97387629 0.97565679 0.96753671 0.90792196 3 68.272856
880 male repub 0.97406629 0.97583416 0.96777129 0.90854661 32 2.023480
881 female dem 0.97425495 0.97601028 0.96800424 0.90916744 4 65.455334
882 female repub 0.97444227 0.97618514 0.96823555 0.90978448 32 1.930268
883 male dem 0.97462826 0.97635875 0.96846525 0.91039774 3 68.272856
884 male repub 0.97481293 0.97653113 0.96869334 0.91100724 32 2.023480
885 female dem 0.97499630 0.97670229 0.96891984 0.91161300 4 65.455334
886 female repub 0.97517836 0.97687222 0.96914475 0.91221503 32 1.930268
887 male dem 0.97535913 0.97704095 0.96936808 0.91281335 3 68.272856
888 male repub 0.97553862 0.97720847 0.96958984 0.91340799 32 2.023480
889 female dem 0.97571683 0.97737480 0.96981006 0.91399894 4 65.455334
890 female repub 0.97589378 0.97753994 0.97002872 0.91458625 32 1.930268
891 male dem 0.97606947 0.97770391 0.97024585 0.91516991 3 68.272856
892 male repub 0.97624391 0.97786670 0.97046146 0.91574995 32 2.023480
893 female dem 0.97641710 0.97802834 0.97067555 0.91632639 4 65.455334
894 female repub 0.97658907 0.97818882 0.97088813 0.91689924 32 1.930268
895 male dem 0.97675981 0.97834815 0.97109922 0.91746853 3 68.272856
896 male repub 0.97692934 0.97850634 0.97130882 0.91803426 32 2.023480
897 female dem 0.97709765 0.97866341 0.97151695 0.91859646 4 65.455334
898 female repub 0.97726477 0.97881935 0.97172362 0.91915514 32 1.930268
899 male dem 0.97743070 0.97897417 0.97192882 0.91971033 3 68.272856
900 male repub 0.97759545 0.97912789 0.97213258 0.92026203 32 2.023480
901 female dem 0.97775901 0.97928051 0.97233491 0.92081027 4 65.455334
902 female repub 0.97792142 0.97943204 0.97253580 0.92135505 32 1.930268
903 male dem 0.97808266 0.97958248 0.97273528 0.92189641 3 68.272856
904 male repub 0.97824275 0.97973184 0.97293335 0.92243436 32 2.023480
905 female dem 0.97840170 0.97988013 0.97313002 0.92296891 4 65.455334
906 female repub 0.97855951 0.98002736 0.97332530 0.92350009 32 1.930268
907 male dem 0.97871619 0.98017354 0.97351920 0.92402790 3 68.272856
908 male repub 0.97887176 0.98031866 0.97371173 0.92455237 32 2.023480
909 female dem 0.97902621 0.98046275 0.97390289 0.92507351 4 65.455334
910 female repub 0.97917955 0.98060580 0.97409271 0.92559134 32 1.930268
911 male dem 0.97933180 0.98074782 0.97428117 0.92610587 3 68.272856
912 male repub 0.97948296 0.98088883 0.97446831 0.92661714 32 2.023480
913 female dem 0.97963304 0.98102882 0.97465412 0.92712514 4 65.455334
914 female repub 0.97978204 0.98116781 0.97483861 0.92762990 32 1.930268
915 male dem 0.97992997 0.98130579 0.97502179 0.92813144 3 68.272856
916 male repub 0.98007684 0.98144279 0.97520367 0.92862976 32 2.023480
917 female dem 0.98022266 0.98157880 0.97538426 0.92912490 4 65.455334
918 female repub 0.98036744 0.98171383 0.97556357 0.92961686 32 1.930268
919 male dem 0.98051117 0.98184789 0.97574160 0.93010566 3 68.272856
920 male repub 0.98065388 0.98198099 0.97591837 0.93059132 32 2.023480
921 female dem 0.98079555 0.98211312 0.97609389 0.93107386 4 65.455334
922 female repub 0.98093622 0.98224431 0.97626815 0.93155329 32 1.930268
923 male dem 0.98107587 0.98237455 0.97644118 0.93202963 3 68.272856
924 male repub 0.98121452 0.98250385 0.97661297 0.93250289 32 2.023480
925 female dem 0.98135217 0.98263222 0.97678354 0.93297310 4 65.455334
926 female repub 0.98148883 0.98275967 0.97695290 0.93344026 32 1.930268
927 male dem 0.98162451 0.98288620 0.97712105 0.93390440 3 68.272856
928 male repub 0.98175921 0.98301181 0.97728800 0.93436553 32 2.023480
929 female dem 0.98189294 0.98313652 0.97745377 0.93482366 4 65.455334
930 female repub 0.98202572 0.98326033 0.97761835 0.93527882 32 1.930268
931 male dem 0.98215753 0.98338324 0.97778175 0.93573102 3 68.272856
932 male repub 0.98228840 0.98350527 0.97794399 0.93618028 32 2.023480
933 female dem 0.98241832 0.98362641 0.97810507 0.93662661 4 65.455334
934 female repub 0.98254731 0.98374668 0.97826500 0.93707003 32 1.930268
935 male dem 0.98267536 0.98386609 0.97842379 0.93751055 3 68.272856
936 male repub 0.98280250 0.98398462 0.97858145 0.93794819 32 2.023480
937 female dem 0.98292872 0.98410231 0.97873797 0.93838297 4 65.455334
938 female repub 0.98305402 0.98421914 0.97889338 0.93881490 32 1.930268
939 male dem 0.98317843 0.98433512 0.97904768 0.93924399 3 68.272856
940 male repub 0.98330193 0.98445027 0.97920087 0.93967028 32 2.023480
941 female dem 0.98342455 0.98456459 0.97935297 0.94009376 4 65.455334
942 female repub 0.98354628 0.98467807 0.97950397 0.94051446 32 1.930268
943 male dem 0.98366713 0.98479074 0.97965390 0.94093239 3 68.272856
944 male repub 0.98378710 0.98490259 0.97980275 0.94134756 32 2.023480
945 female dem 0.98390621 0.98501363 0.97995053 0.94176000 4 65.455334
946 female repub 0.98402446 0.98512386 0.98009726 0.94216972 32 1.930268
947 male dem 0.98414186 0.98523330 0.98024293 0.94257673 3 68.272856
948 male repub 0.98425840 0.98534194 0.98038756 0.94298105 32 2.023480
949 female dem 0.98437410 0.98544980 0.98053115 0.94338269 4 65.455334
950 female repub 0.98448897 0.98555687 0.98067371 0.94378167 32 1.930268
951 male dem 0.98460300 0.98566317 0.98081525 0.94417801 3 68.272856
952 male repub 0.98471621 0.98576870 0.98095577 0.94457172 32 2.023480
953 female dem 0.98482860 0.98587346 0.98109528 0.94496281 4 65.455334
954 female repub 0.98494018 0.98597746 0.98123379 0.94535130 32 1.930268
955 male dem 0.98505094 0.98608070 0.98137130 0.94573721 3 68.272856
956 male repub 0.98516091 0.98618320 0.98150782 0.94612055 32 2.023480
957 female dem 0.98527008 0.98628495 0.98164337 0.94650133 4 65.455334
958 female repub 0.98537845 0.98638596 0.98177793 0.94687957 32 1.930268
959 male dem 0.98548604 0.98648624 0.98191153 0.94725529 3 68.272856
960 male repub 0.98559286 0.98658579 0.98204417 0.94762850 32 2.023480
961 female dem 0.98569889 0.98668462 0.98217585 0.94799921 4 65.455334
962 female repub 0.98580416 0.98678273 0.98230659 0.94836744 32 1.930268
963 male dem 0.98590866 0.98688013 0.98243638 0.94873320 3 68.272856
964 male repub 0.98601241 0.98697681 0.98256524 0.94909652 32 2.023480
965 female dem 0.98611540 0.98707280 0.98269316 0.94945739 4 65.455334
966 female repub 0.98621764 0.98716808 0.98282017 0.94981584 32 1.930268
967 male dem 0.98631915 0.98726268 0.98294626 0.95017188 3 68.272856
968 male repub 0.98641991 0.98735658 0.98307144 0.95052553 32 2.023480
969 female dem 0.98651994 0.98744980 0.98319572 0.95087680 4 65.455334
970 female repub 0.98661925 0.98754234 0.98331910 0.95122570 32 1.930268
971 male dem 0.98671783 0.98763421 0.98344159 0.95157225 3 68.272856
972 male repub 0.98681570 0.98772541 0.98356320 0.95191646 32 2.023480
973 female dem 0.98691286 0.98781595 0.98368392 0.95225835 4 65.455334
974 female repub 0.98700931 0.98790582 0.98380378 0.95259793 32 1.930268
975 male dem 0.98710505 0.98799504 0.98392277 0.95293521 3 68.272856
976 male repub 0.98720010 0.98808361 0.98404090 0.95327021 32 2.023480
977 female dem 0.98729446 0.98817154 0.98415817 0.95360295 4 65.455334
978 female repub 0.98738814 0.98825882 0.98427460 0.95393342 32 1.930268
979 male dem 0.98748113 0.98834547 0.98439018 0.95426166 3 68.272856
980 male repub 0.98757344 0.98843148 0.98450493 0.95458767 32 2.023480
981 female dem 0.98766508 0.98851687 0.98461885 0.95491146 4 65.455334
982 female repub 0.98775606 0.98860163 0.98473195 0.95523306 32 1.930268
983 male dem 0.98784637 0.98868578 0.98484422 0.95555246 3 68.272856
984 male repub 0.98793602 0.98876931 0.98495568 0.95586970 32 2.023480
985 female dem 0.98802502 0.98885223 0.98506634 0.95618477 4 65.455334
986 female repub 0.98811338 0.98893455 0.98517619 0.95649770 32 1.930268
987 male dem 0.98820108 0.98901627 0.98528525 0.95680849 3 68.272856
988 male repub 0.98828815 0.98909739 0.98539352 0.95711716 32 2.023480
989 female dem 0.98837458 0.98917791 0.98550100 0.95742373 4 65.455334
990 female repub 0.98846039 0.98925785 0.98560770 0.95772819 32 1.930268
991 male dem 0.98854556 0.98933720 0.98571363 0.95803058 3 68.272856
992 male repub 0.98863012 0.98941598 0.98581879 0.95833090 32 2.023480
993 female dem 0.98871406 0.98949418 0.98592319 0.95862916 4 65.455334
994 female repub 0.98879738 0.98957180 0.98602683 0.95892538 32 1.930268
995 male dem 0.98888010 0.98964886 0.98612971 0.95921957 3 68.272856
996 male repub 0.98896221 0.98972536 0.98623186 0.95951174 32 2.023480
997 female dem 0.98904373 0.98980129 0.98633325 0.95980190 4 65.455334
998 female repub 0.98912465 0.98987667 0.98643392 0.96009007 32 1.930268
999 male dem 0.98920497 0.98995150 0.98653385 0.96037626 3 68.272856
1000 male repub 0.98928471 0.99002578 0.98663305 0.96066049 32 2.023480
y2.1 y3.1 y4.1 y5.1
1 266.35063 197.58961 76.85076 5.796383
2 16.63435 70.01972 360.82006 162.638320
3 270.70537 193.74153 73.79200 5.530949
4 17.41203 72.79395 362.76203 157.051229
5 266.35063 197.58961 76.85076 5.796383
6 16.63435 70.01972 360.82006 162.638320
7 270.70537 193.74153 73.79200 5.530949
8 17.41203 72.79395 362.76203 157.051229
9 266.35063 197.58961 76.85076 5.796383
10 16.63435 70.01972 360.82006 162.638320
11 270.70537 193.74153 73.79200 5.530949
12 17.41203 72.79395 362.76203 157.051229
13 266.35063 197.58961 76.85076 5.796383
14 16.63435 70.01972 360.82006 162.638320
15 270.70537 193.74153 73.79200 5.530949
16 17.41203 72.79395 362.76203 157.051229
17 266.35063 197.58961 76.85076 5.796383
18 16.63435 70.01972 360.82006 162.638320
19 270.70537 193.74153 73.79200 5.530949
20 17.41203 72.79395 362.76203 157.051229
21 266.35063 197.58961 76.85076 5.796383
22 16.63435 70.01972 360.82006 162.638320
23 270.70537 193.74153 73.79200 5.530949
24 17.41203 72.79395 362.76203 157.051229
25 266.35063 197.58961 76.85076 5.796383
26 16.63435 70.01972 360.82006 162.638320
27 270.70537 193.74153 73.79200 5.530949
28 17.41203 72.79395 362.76203 157.051229
29 266.35063 197.58961 76.85076 5.796383
30 16.63435 70.01972 360.82006 162.638320
31 270.70537 193.74153 73.79200 5.530949
32 17.41203 72.79395 362.76203 157.051229
33 266.35063 197.58961 76.85076 5.796383
34 16.63435 70.01972 360.82006 162.638320
35 270.70537 193.74153 73.79200 5.530949
36 17.41203 72.79395 362.76203 157.051229
37 266.35063 197.58961 76.85076 5.796383
38 16.63435 70.01972 360.82006 162.638320
39 270.70537 193.74153 73.79200 5.530949
40 17.41203 72.79395 362.76203 157.051229
41 266.35063 197.58961 76.85076 5.796383
42 16.63435 70.01972 360.82006 162.638320
43 270.70537 193.74153 73.79200 5.530949
44 17.41203 72.79395 362.76203 157.051229
45 266.35063 197.58961 76.85076 5.796383
46 16.63435 70.01972 360.82006 162.638320
47 270.70537 193.74153 73.79200 5.530949
48 17.41203 72.79395 362.76203 157.051229
49 266.35063 197.58961 76.85076 5.796383
50 16.63435 70.01972 360.82006 162.638320
51 270.70537 193.74153 73.79200 5.530949
52 17.41203 72.79395 362.76203 157.051229
53 266.35063 197.58961 76.85076 5.796383
54 16.63435 70.01972 360.82006 162.638320
55 270.70537 193.74153 73.79200 5.530949
56 17.41203 72.79395 362.76203 157.051229
57 266.35063 197.58961 76.85076 5.796383
58 16.63435 70.01972 360.82006 162.638320
59 270.70537 193.74153 73.79200 5.530949
60 17.41203 72.79395 362.76203 157.051229
61 266.35063 197.58961 76.85076 5.796383
62 16.63435 70.01972 360.82006 162.638320
63 270.70537 193.74153 73.79200 5.530949
64 17.41203 72.79395 362.76203 157.051229
65 266.35063 197.58961 76.85076 5.796383
66 16.63435 70.01972 360.82006 162.638320
67 270.70537 193.74153 73.79200 5.530949
68 17.41203 72.79395 362.76203 157.051229
69 266.35063 197.58961 76.85076 5.796383
70 16.63435 70.01972 360.82006 162.638320
71 270.70537 193.74153 73.79200 5.530949
72 17.41203 72.79395 362.76203 157.051229
73 266.35063 197.58961 76.85076 5.796383
74 16.63435 70.01972 360.82006 162.638320
75 270.70537 193.74153 73.79200 5.530949
76 17.41203 72.79395 362.76203 157.051229
77 266.35063 197.58961 76.85076 5.796383
78 16.63435 70.01972 360.82006 162.638320
79 270.70537 193.74153 73.79200 5.530949
80 17.41203 72.79395 362.76203 157.051229
81 266.35063 197.58961 76.85076 5.796383
82 16.63435 70.01972 360.82006 162.638320
83 270.70537 193.74153 73.79200 5.530949
84 17.41203 72.79395 362.76203 157.051229
85 266.35063 197.58961 76.85076 5.796383
86 16.63435 70.01972 360.82006 162.638320
87 270.70537 193.74153 73.79200 5.530949
88 17.41203 72.79395 362.76203 157.051229
89 266.35063 197.58961 76.85076 5.796383
90 16.63435 70.01972 360.82006 162.638320
91 270.70537 193.74153 73.79200 5.530949
92 17.41203 72.79395 362.76203 157.051229
93 266.35063 197.58961 76.85076 5.796383
94 16.63435 70.01972 360.82006 162.638320
95 270.70537 193.74153 73.79200 5.530949
96 17.41203 72.79395 362.76203 157.051229
97 266.35063 197.58961 76.85076 5.796383
98 16.63435 70.01972 360.82006 162.638320
99 270.70537 193.74153 73.79200 5.530949
100 17.41203 72.79395 362.76203 157.051229
101 266.35063 197.58961 76.85076 5.796383
102 16.63435 70.01972 360.82006 162.638320
103 270.70537 193.74153 73.79200 5.530949
104 17.41203 72.79395 362.76203 157.051229
105 266.35063 197.58961 76.85076 5.796383
106 16.63435 70.01972 360.82006 162.638320
107 270.70537 193.74153 73.79200 5.530949
108 17.41203 72.79395 362.76203 157.051229
109 266.35063 197.58961 76.85076 5.796383
110 16.63435 70.01972 360.82006 162.638320
111 270.70537 193.74153 73.79200 5.530949
112 17.41203 72.79395 362.76203 157.051229
113 266.35063 197.58961 76.85076 5.796383
114 16.63435 70.01972 360.82006 162.638320
115 270.70537 193.74153 73.79200 5.530949
116 17.41203 72.79395 362.76203 157.051229
117 266.35063 197.58961 76.85076 5.796383
118 16.63435 70.01972 360.82006 162.638320
119 270.70537 193.74153 73.79200 5.530949
120 17.41203 72.79395 362.76203 157.051229
121 266.35063 197.58961 76.85076 5.796383
122 16.63435 70.01972 360.82006 162.638320
123 270.70537 193.74153 73.79200 5.530949
124 17.41203 72.79395 362.76203 157.051229
125 266.35063 197.58961 76.85076 5.796383
126 16.63435 70.01972 360.82006 162.638320
127 270.70537 193.74153 73.79200 5.530949
128 17.41203 72.79395 362.76203 157.051229
129 266.35063 197.58961 76.85076 5.796383
130 16.63435 70.01972 360.82006 162.638320
131 270.70537 193.74153 73.79200 5.530949
132 17.41203 72.79395 362.76203 157.051229
133 266.35063 197.58961 76.85076 5.796383
134 16.63435 70.01972 360.82006 162.638320
135 270.70537 193.74153 73.79200 5.530949
136 17.41203 72.79395 362.76203 157.051229
137 266.35063 197.58961 76.85076 5.796383
138 16.63435 70.01972 360.82006 162.638320
139 270.70537 193.74153 73.79200 5.530949
140 17.41203 72.79395 362.76203 157.051229
141 266.35063 197.58961 76.85076 5.796383
142 16.63435 70.01972 360.82006 162.638320
143 270.70537 193.74153 73.79200 5.530949
144 17.41203 72.79395 362.76203 157.051229
145 266.35063 197.58961 76.85076 5.796383
146 16.63435 70.01972 360.82006 162.638320
147 270.70537 193.74153 73.79200 5.530949
148 17.41203 72.79395 362.76203 157.051229
149 266.35063 197.58961 76.85076 5.796383
150 16.63435 70.01972 360.82006 162.638320
151 270.70537 193.74153 73.79200 5.530949
152 17.41203 72.79395 362.76203 157.051229
153 266.35063 197.58961 76.85076 5.796383
154 16.63435 70.01972 360.82006 162.638320
155 270.70537 193.74153 73.79200 5.530949
156 17.41203 72.79395 362.76203 157.051229
157 266.35063 197.58961 76.85076 5.796383
158 16.63435 70.01972 360.82006 162.638320
159 270.70537 193.74153 73.79200 5.530949
160 17.41203 72.79395 362.76203 157.051229
161 266.35063 197.58961 76.85076 5.796383
162 16.63435 70.01972 360.82006 162.638320
163 270.70537 193.74153 73.79200 5.530949
164 17.41203 72.79395 362.76203 157.051229
165 266.35063 197.58961 76.85076 5.796383
166 16.63435 70.01972 360.82006 162.638320
167 270.70537 193.74153 73.79200 5.530949
168 17.41203 72.79395 362.76203 157.051229
169 266.35063 197.58961 76.85076 5.796383
170 16.63435 70.01972 360.82006 162.638320
171 270.70537 193.74153 73.79200 5.530949
172 17.41203 72.79395 362.76203 157.051229
173 266.35063 197.58961 76.85076 5.796383
174 16.63435 70.01972 360.82006 162.638320
175 270.70537 193.74153 73.79200 5.530949
176 17.41203 72.79395 362.76203 157.051229
177 266.35063 197.58961 76.85076 5.796383
178 16.63435 70.01972 360.82006 162.638320
179 270.70537 193.74153 73.79200 5.530949
180 17.41203 72.79395 362.76203 157.051229
181 266.35063 197.58961 76.85076 5.796383
182 16.63435 70.01972 360.82006 162.638320
183 270.70537 193.74153 73.79200 5.530949
184 17.41203 72.79395 362.76203 157.051229
185 266.35063 197.58961 76.85076 5.796383
186 16.63435 70.01972 360.82006 162.638320
187 270.70537 193.74153 73.79200 5.530949
188 17.41203 72.79395 362.76203 157.051229
189 266.35063 197.58961 76.85076 5.796383
190 16.63435 70.01972 360.82006 162.638320
191 270.70537 193.74153 73.79200 5.530949
192 17.41203 72.79395 362.76203 157.051229
193 266.35063 197.58961 76.85076 5.796383
194 16.63435 70.01972 360.82006 162.638320
195 270.70537 193.74153 73.79200 5.530949
196 17.41203 72.79395 362.76203 157.051229
197 266.35063 197.58961 76.85076 5.796383
198 16.63435 70.01972 360.82006 162.638320
199 270.70537 193.74153 73.79200 5.530949
200 17.41203 72.79395 362.76203 157.051229
201 266.35063 197.58961 76.85076 5.796383
202 16.63435 70.01972 360.82006 162.638320
203 270.70537 193.74153 73.79200 5.530949
204 17.41203 72.79395 362.76203 157.051229
205 266.35063 197.58961 76.85076 5.796383
206 16.63435 70.01972 360.82006 162.638320
207 270.70537 193.74153 73.79200 5.530949
208 17.41203 72.79395 362.76203 157.051229
209 266.35063 197.58961 76.85076 5.796383
210 16.63435 70.01972 360.82006 162.638320
211 270.70537 193.74153 73.79200 5.530949
212 17.41203 72.79395 362.76203 157.051229
213 266.35063 197.58961 76.85076 5.796383
214 16.63435 70.01972 360.82006 162.638320
215 270.70537 193.74153 73.79200 5.530949
216 17.41203 72.79395 362.76203 157.051229
217 266.35063 197.58961 76.85076 5.796383
218 16.63435 70.01972 360.82006 162.638320
219 270.70537 193.74153 73.79200 5.530949
220 17.41203 72.79395 362.76203 157.051229
221 266.35063 197.58961 76.85076 5.796383
222 16.63435 70.01972 360.82006 162.638320
223 270.70537 193.74153 73.79200 5.530949
224 17.41203 72.79395 362.76203 157.051229
225 266.35063 197.58961 76.85076 5.796383
226 16.63435 70.01972 360.82006 162.638320
227 270.70537 193.74153 73.79200 5.530949
228 17.41203 72.79395 362.76203 157.051229
229 266.35063 197.58961 76.85076 5.796383
230 16.63435 70.01972 360.82006 162.638320
231 270.70537 193.74153 73.79200 5.530949
232 17.41203 72.79395 362.76203 157.051229
233 266.35063 197.58961 76.85076 5.796383
234 16.63435 70.01972 360.82006 162.638320
235 270.70537 193.74153 73.79200 5.530949
236 17.41203 72.79395 362.76203 157.051229
237 266.35063 197.58961 76.85076 5.796383
238 16.63435 70.01972 360.82006 162.638320
239 270.70537 193.74153 73.79200 5.530949
240 17.41203 72.79395 362.76203 157.051229
241 266.35063 197.58961 76.85076 5.796383
242 16.63435 70.01972 360.82006 162.638320
243 270.70537 193.74153 73.79200 5.530949
244 17.41203 72.79395 362.76203 157.051229
245 266.35063 197.58961 76.85076 5.796383
246 16.63435 70.01972 360.82006 162.638320
247 270.70537 193.74153 73.79200 5.530949
248 17.41203 72.79395 362.76203 157.051229
249 266.35063 197.58961 76.85076 5.796383
250 16.63435 70.01972 360.82006 162.638320
251 270.70537 193.74153 73.79200 5.530949
252 17.41203 72.79395 362.76203 157.051229
253 266.35063 197.58961 76.85076 5.796383
254 16.63435 70.01972 360.82006 162.638320
255 270.70537 193.74153 73.79200 5.530949
256 17.41203 72.79395 362.76203 157.051229
257 266.35063 197.58961 76.85076 5.796383
258 16.63435 70.01972 360.82006 162.638320
259 270.70537 193.74153 73.79200 5.530949
260 17.41203 72.79395 362.76203 157.051229
261 266.35063 197.58961 76.85076 5.796383
262 16.63435 70.01972 360.82006 162.638320
263 270.70537 193.74153 73.79200 5.530949
264 17.41203 72.79395 362.76203 157.051229
265 266.35063 197.58961 76.85076 5.796383
266 16.63435 70.01972 360.82006 162.638320
267 270.70537 193.74153 73.79200 5.530949
268 17.41203 72.79395 362.76203 157.051229
269 266.35063 197.58961 76.85076 5.796383
270 16.63435 70.01972 360.82006 162.638320
271 270.70537 193.74153 73.79200 5.530949
272 17.41203 72.79395 362.76203 157.051229
273 266.35063 197.58961 76.85076 5.796383
274 16.63435 70.01972 360.82006 162.638320
275 270.70537 193.74153 73.79200 5.530949
276 17.41203 72.79395 362.76203 157.051229
277 266.35063 197.58961 76.85076 5.796383
278 16.63435 70.01972 360.82006 162.638320
279 270.70537 193.74153 73.79200 5.530949
280 17.41203 72.79395 362.76203 157.051229
281 266.35063 197.58961 76.85076 5.796383
282 16.63435 70.01972 360.82006 162.638320
283 270.70537 193.74153 73.79200 5.530949
284 17.41203 72.79395 362.76203 157.051229
285 266.35063 197.58961 76.85076 5.796383
286 16.63435 70.01972 360.82006 162.638320
287 270.70537 193.74153 73.79200 5.530949
288 17.41203 72.79395 362.76203 157.051229
289 266.35063 197.58961 76.85076 5.796383
290 16.63435 70.01972 360.82006 162.638320
291 270.70537 193.74153 73.79200 5.530949
292 17.41203 72.79395 362.76203 157.051229
293 266.35063 197.58961 76.85076 5.796383
294 16.63435 70.01972 360.82006 162.638320
295 270.70537 193.74153 73.79200 5.530949
296 17.41203 72.79395 362.76203 157.051229
297 266.35063 197.58961 76.85076 5.796383
298 16.63435 70.01972 360.82006 162.638320
299 270.70537 193.74153 73.79200 5.530949
300 17.41203 72.79395 362.76203 157.051229
301 266.35063 197.58961 76.85076 5.796383
302 16.63435 70.01972 360.82006 162.638320
303 270.70537 193.74153 73.79200 5.530949
304 17.41203 72.79395 362.76203 157.051229
305 266.35063 197.58961 76.85076 5.796383
306 16.63435 70.01972 360.82006 162.638320
307 270.70537 193.74153 73.79200 5.530949
308 17.41203 72.79395 362.76203 157.051229
309 266.35063 197.58961 76.85076 5.796383
310 16.63435 70.01972 360.82006 162.638320
311 270.70537 193.74153 73.79200 5.530949
312 17.41203 72.79395 362.76203 157.051229
313 266.35063 197.58961 76.85076 5.796383
314 16.63435 70.01972 360.82006 162.638320
315 270.70537 193.74153 73.79200 5.530949
316 17.41203 72.79395 362.76203 157.051229
317 266.35063 197.58961 76.85076 5.796383
318 16.63435 70.01972 360.82006 162.638320
319 270.70537 193.74153 73.79200 5.530949
320 17.41203 72.79395 362.76203 157.051229
321 266.35063 197.58961 76.85076 5.796383
322 16.63435 70.01972 360.82006 162.638320
323 270.70537 193.74153 73.79200 5.530949
324 17.41203 72.79395 362.76203 157.051229
325 266.35063 197.58961 76.85076 5.796383
326 16.63435 70.01972 360.82006 162.638320
327 270.70537 193.74153 73.79200 5.530949
328 17.41203 72.79395 362.76203 157.051229
329 266.35063 197.58961 76.85076 5.796383
330 16.63435 70.01972 360.82006 162.638320
331 270.70537 193.74153 73.79200 5.530949
332 17.41203 72.79395 362.76203 157.051229
333 266.35063 197.58961 76.85076 5.796383
334 16.63435 70.01972 360.82006 162.638320
335 270.70537 193.74153 73.79200 5.530949
336 17.41203 72.79395 362.76203 157.051229
337 266.35063 197.58961 76.85076 5.796383
338 16.63435 70.01972 360.82006 162.638320
339 270.70537 193.74153 73.79200 5.530949
340 17.41203 72.79395 362.76203 157.051229
341 266.35063 197.58961 76.85076 5.796383
342 16.63435 70.01972 360.82006 162.638320
343 270.70537 193.74153 73.79200 5.530949
344 17.41203 72.79395 362.76203 157.051229
345 266.35063 197.58961 76.85076 5.796383
346 16.63435 70.01972 360.82006 162.638320
347 270.70537 193.74153 73.79200 5.530949
348 17.41203 72.79395 362.76203 157.051229
349 266.35063 197.58961 76.85076 5.796383
350 16.63435 70.01972 360.82006 162.638320
351 270.70537 193.74153 73.79200 5.530949
352 17.41203 72.79395 362.76203 157.051229
353 266.35063 197.58961 76.85076 5.796383
354 16.63435 70.01972 360.82006 162.638320
355 270.70537 193.74153 73.79200 5.530949
356 17.41203 72.79395 362.76203 157.051229
357 266.35063 197.58961 76.85076 5.796383
358 16.63435 70.01972 360.82006 162.638320
359 270.70537 193.74153 73.79200 5.530949
360 17.41203 72.79395 362.76203 157.051229
361 266.35063 197.58961 76.85076 5.796383
362 16.63435 70.01972 360.82006 162.638320
363 270.70537 193.74153 73.79200 5.530949
364 17.41203 72.79395 362.76203 157.051229
365 266.35063 197.58961 76.85076 5.796383
366 16.63435 70.01972 360.82006 162.638320
367 270.70537 193.74153 73.79200 5.530949
368 17.41203 72.79395 362.76203 157.051229
369 266.35063 197.58961 76.85076 5.796383
370 16.63435 70.01972 360.82006 162.638320
371 270.70537 193.74153 73.79200 5.530949
372 17.41203 72.79395 362.76203 157.051229
373 266.35063 197.58961 76.85076 5.796383
374 16.63435 70.01972 360.82006 162.638320
375 270.70537 193.74153 73.79200 5.530949
376 17.41203 72.79395 362.76203 157.051229
377 266.35063 197.58961 76.85076 5.796383
378 16.63435 70.01972 360.82006 162.638320
379 270.70537 193.74153 73.79200 5.530949
380 17.41203 72.79395 362.76203 157.051229
381 266.35063 197.58961 76.85076 5.796383
382 16.63435 70.01972 360.82006 162.638320
383 270.70537 193.74153 73.79200 5.530949
384 17.41203 72.79395 362.76203 157.051229
385 266.35063 197.58961 76.85076 5.796383
386 16.63435 70.01972 360.82006 162.638320
387 270.70537 193.74153 73.79200 5.530949
388 17.41203 72.79395 362.76203 157.051229
389 266.35063 197.58961 76.85076 5.796383
390 16.63435 70.01972 360.82006 162.638320
391 270.70537 193.74153 73.79200 5.530949
392 17.41203 72.79395 362.76203 157.051229
393 266.35063 197.58961 76.85076 5.796383
394 16.63435 70.01972 360.82006 162.638320
395 270.70537 193.74153 73.79200 5.530949
396 17.41203 72.79395 362.76203 157.051229
397 266.35063 197.58961 76.85076 5.796383
398 16.63435 70.01972 360.82006 162.638320
399 270.70537 193.74153 73.79200 5.530949
400 17.41203 72.79395 362.76203 157.051229
401 266.35063 197.58961 76.85076 5.796383
402 16.63435 70.01972 360.82006 162.638320
403 270.70537 193.74153 73.79200 5.530949
404 17.41203 72.79395 362.76203 157.051229
405 266.35063 197.58961 76.85076 5.796383
406 16.63435 70.01972 360.82006 162.638320
407 270.70537 193.74153 73.79200 5.530949
408 17.41203 72.79395 362.76203 157.051229
409 266.35063 197.58961 76.85076 5.796383
410 16.63435 70.01972 360.82006 162.638320
411 270.70537 193.74153 73.79200 5.530949
412 17.41203 72.79395 362.76203 157.051229
413 266.35063 197.58961 76.85076 5.796383
414 16.63435 70.01972 360.82006 162.638320
415 270.70537 193.74153 73.79200 5.530949
416 17.41203 72.79395 362.76203 157.051229
417 266.35063 197.58961 76.85076 5.796383
418 16.63435 70.01972 360.82006 162.638320
419 270.70537 193.74153 73.79200 5.530949
420 17.41203 72.79395 362.76203 157.051229
421 266.35063 197.58961 76.85076 5.796383
422 16.63435 70.01972 360.82006 162.638320
423 270.70537 193.74153 73.79200 5.530949
424 17.41203 72.79395 362.76203 157.051229
425 266.35063 197.58961 76.85076 5.796383
426 16.63435 70.01972 360.82006 162.638320
427 270.70537 193.74153 73.79200 5.530949
428 17.41203 72.79395 362.76203 157.051229
429 266.35063 197.58961 76.85076 5.796383
430 16.63435 70.01972 360.82006 162.638320
431 270.70537 193.74153 73.79200 5.530949
432 17.41203 72.79395 362.76203 157.051229
433 266.35063 197.58961 76.85076 5.796383
434 16.63435 70.01972 360.82006 162.638320
435 270.70537 193.74153 73.79200 5.530949
436 17.41203 72.79395 362.76203 157.051229
437 266.35063 197.58961 76.85076 5.796383
438 16.63435 70.01972 360.82006 162.638320
439 270.70537 193.74153 73.79200 5.530949
440 17.41203 72.79395 362.76203 157.051229
441 266.35063 197.58961 76.85076 5.796383
442 16.63435 70.01972 360.82006 162.638320
443 270.70537 193.74153 73.79200 5.530949
444 17.41203 72.79395 362.76203 157.051229
445 266.35063 197.58961 76.85076 5.796383
446 16.63435 70.01972 360.82006 162.638320
447 270.70537 193.74153 73.79200 5.530949
448 17.41203 72.79395 362.76203 157.051229
449 266.35063 197.58961 76.85076 5.796383
450 16.63435 70.01972 360.82006 162.638320
451 270.70537 193.74153 73.79200 5.530949
452 17.41203 72.79395 362.76203 157.051229
453 266.35063 197.58961 76.85076 5.796383
454 16.63435 70.01972 360.82006 162.638320
455 270.70537 193.74153 73.79200 5.530949
456 17.41203 72.79395 362.76203 157.051229
457 266.35063 197.58961 76.85076 5.796383
458 16.63435 70.01972 360.82006 162.638320
459 270.70537 193.74153 73.79200 5.530949
460 17.41203 72.79395 362.76203 157.051229
461 266.35063 197.58961 76.85076 5.796383
462 16.63435 70.01972 360.82006 162.638320
463 270.70537 193.74153 73.79200 5.530949
464 17.41203 72.79395 362.76203 157.051229
465 266.35063 197.58961 76.85076 5.796383
466 16.63435 70.01972 360.82006 162.638320
467 270.70537 193.74153 73.79200 5.530949
468 17.41203 72.79395 362.76203 157.051229
469 266.35063 197.58961 76.85076 5.796383
470 16.63435 70.01972 360.82006 162.638320
471 270.70537 193.74153 73.79200 5.530949
472 17.41203 72.79395 362.76203 157.051229
473 266.35063 197.58961 76.85076 5.796383
474 16.63435 70.01972 360.82006 162.638320
475 270.70537 193.74153 73.79200 5.530949
476 17.41203 72.79395 362.76203 157.051229
477 266.35063 197.58961 76.85076 5.796383
478 16.63435 70.01972 360.82006 162.638320
479 270.70537 193.74153 73.79200 5.530949
480 17.41203 72.79395 362.76203 157.051229
481 266.35063 197.58961 76.85076 5.796383
482 16.63435 70.01972 360.82006 162.638320
483 270.70537 193.74153 73.79200 5.530949
484 17.41203 72.79395 362.76203 157.051229
485 266.35063 197.58961 76.85076 5.796383
486 16.63435 70.01972 360.82006 162.638320
487 270.70537 193.74153 73.79200 5.530949
488 17.41203 72.79395 362.76203 157.051229
489 266.35063 197.58961 76.85076 5.796383
490 16.63435 70.01972 360.82006 162.638320
491 270.70537 193.74153 73.79200 5.530949
492 17.41203 72.79395 362.76203 157.051229
493 266.35063 197.58961 76.85076 5.796383
494 16.63435 70.01972 360.82006 162.638320
495 270.70537 193.74153 73.79200 5.530949
496 17.41203 72.79395 362.76203 157.051229
497 266.35063 197.58961 76.85076 5.796383
498 16.63435 70.01972 360.82006 162.638320
499 270.70537 193.74153 73.79200 5.530949
500 17.41203 72.79395 362.76203 157.051229
501 266.35063 197.58961 76.85076 5.796383
502 16.63435 70.01972 360.82006 162.638320
503 270.70537 193.74153 73.79200 5.530949
504 17.41203 72.79395 362.76203 157.051229
505 266.35063 197.58961 76.85076 5.796383
506 16.63435 70.01972 360.82006 162.638320
507 270.70537 193.74153 73.79200 5.530949
508 17.41203 72.79395 362.76203 157.051229
509 266.35063 197.58961 76.85076 5.796383
510 16.63435 70.01972 360.82006 162.638320
511 270.70537 193.74153 73.79200 5.530949
512 17.41203 72.79395 362.76203 157.051229
513 266.35063 197.58961 76.85076 5.796383
514 16.63435 70.01972 360.82006 162.638320
515 270.70537 193.74153 73.79200 5.530949
516 17.41203 72.79395 362.76203 157.051229
517 266.35063 197.58961 76.85076 5.796383
518 16.63435 70.01972 360.82006 162.638320
519 270.70537 193.74153 73.79200 5.530949
520 17.41203 72.79395 362.76203 157.051229
521 266.35063 197.58961 76.85076 5.796383
522 16.63435 70.01972 360.82006 162.638320
523 270.70537 193.74153 73.79200 5.530949
524 17.41203 72.79395 362.76203 157.051229
525 266.35063 197.58961 76.85076 5.796383
526 16.63435 70.01972 360.82006 162.638320
527 270.70537 193.74153 73.79200 5.530949
528 17.41203 72.79395 362.76203 157.051229
529 266.35063 197.58961 76.85076 5.796383
530 16.63435 70.01972 360.82006 162.638320
531 270.70537 193.74153 73.79200 5.530949
532 17.41203 72.79395 362.76203 157.051229
533 266.35063 197.58961 76.85076 5.796383
534 16.63435 70.01972 360.82006 162.638320
535 270.70537 193.74153 73.79200 5.530949
536 17.41203 72.79395 362.76203 157.051229
537 266.35063 197.58961 76.85076 5.796383
538 16.63435 70.01972 360.82006 162.638320
539 270.70537 193.74153 73.79200 5.530949
540 17.41203 72.79395 362.76203 157.051229
541 266.35063 197.58961 76.85076 5.796383
542 16.63435 70.01972 360.82006 162.638320
543 270.70537 193.74153 73.79200 5.530949
544 17.41203 72.79395 362.76203 157.051229
545 266.35063 197.58961 76.85076 5.796383
546 16.63435 70.01972 360.82006 162.638320
547 270.70537 193.74153 73.79200 5.530949
548 17.41203 72.79395 362.76203 157.051229
549 266.35063 197.58961 76.85076 5.796383
550 16.63435 70.01972 360.82006 162.638320
551 270.70537 193.74153 73.79200 5.530949
552 17.41203 72.79395 362.76203 157.051229
553 266.35063 197.58961 76.85076 5.796383
554 16.63435 70.01972 360.82006 162.638320
555 270.70537 193.74153 73.79200 5.530949
556 17.41203 72.79395 362.76203 157.051229
557 266.35063 197.58961 76.85076 5.796383
558 16.63435 70.01972 360.82006 162.638320
559 270.70537 193.74153 73.79200 5.530949
560 17.41203 72.79395 362.76203 157.051229
561 266.35063 197.58961 76.85076 5.796383
562 16.63435 70.01972 360.82006 162.638320
563 270.70537 193.74153 73.79200 5.530949
564 17.41203 72.79395 362.76203 157.051229
565 266.35063 197.58961 76.85076 5.796383
566 16.63435 70.01972 360.82006 162.638320
567 270.70537 193.74153 73.79200 5.530949
568 17.41203 72.79395 362.76203 157.051229
569 266.35063 197.58961 76.85076 5.796383
570 16.63435 70.01972 360.82006 162.638320
571 270.70537 193.74153 73.79200 5.530949
572 17.41203 72.79395 362.76203 157.051229
573 266.35063 197.58961 76.85076 5.796383
574 16.63435 70.01972 360.82006 162.638320
575 270.70537 193.74153 73.79200 5.530949
576 17.41203 72.79395 362.76203 157.051229
577 266.35063 197.58961 76.85076 5.796383
578 16.63435 70.01972 360.82006 162.638320
579 270.70537 193.74153 73.79200 5.530949
580 17.41203 72.79395 362.76203 157.051229
581 266.35063 197.58961 76.85076 5.796383
582 16.63435 70.01972 360.82006 162.638320
583 270.70537 193.74153 73.79200 5.530949
584 17.41203 72.79395 362.76203 157.051229
585 266.35063 197.58961 76.85076 5.796383
586 16.63435 70.01972 360.82006 162.638320
587 270.70537 193.74153 73.79200 5.530949
588 17.41203 72.79395 362.76203 157.051229
589 266.35063 197.58961 76.85076 5.796383
590 16.63435 70.01972 360.82006 162.638320
591 270.70537 193.74153 73.79200 5.530949
592 17.41203 72.79395 362.76203 157.051229
593 266.35063 197.58961 76.85076 5.796383
594 16.63435 70.01972 360.82006 162.638320
595 270.70537 193.74153 73.79200 5.530949
596 17.41203 72.79395 362.76203 157.051229
597 266.35063 197.58961 76.85076 5.796383
598 16.63435 70.01972 360.82006 162.638320
599 270.70537 193.74153 73.79200 5.530949
600 17.41203 72.79395 362.76203 157.051229
601 266.35063 197.58961 76.85076 5.796383
602 16.63435 70.01972 360.82006 162.638320
603 270.70537 193.74153 73.79200 5.530949
604 17.41203 72.79395 362.76203 157.051229
605 266.35063 197.58961 76.85076 5.796383
606 16.63435 70.01972 360.82006 162.638320
607 270.70537 193.74153 73.79200 5.530949
608 17.41203 72.79395 362.76203 157.051229
609 266.35063 197.58961 76.85076 5.796383
610 16.63435 70.01972 360.82006 162.638320
611 270.70537 193.74153 73.79200 5.530949
612 17.41203 72.79395 362.76203 157.051229
613 266.35063 197.58961 76.85076 5.796383
614 16.63435 70.01972 360.82006 162.638320
615 270.70537 193.74153 73.79200 5.530949
616 17.41203 72.79395 362.76203 157.051229
617 266.35063 197.58961 76.85076 5.796383
618 16.63435 70.01972 360.82006 162.638320
619 270.70537 193.74153 73.79200 5.530949
620 17.41203 72.79395 362.76203 157.051229
621 266.35063 197.58961 76.85076 5.796383
622 16.63435 70.01972 360.82006 162.638320
623 270.70537 193.74153 73.79200 5.530949
624 17.41203 72.79395 362.76203 157.051229
625 266.35063 197.58961 76.85076 5.796383
626 16.63435 70.01972 360.82006 162.638320
627 270.70537 193.74153 73.79200 5.530949
628 17.41203 72.79395 362.76203 157.051229
629 266.35063 197.58961 76.85076 5.796383
630 16.63435 70.01972 360.82006 162.638320
631 270.70537 193.74153 73.79200 5.530949
632 17.41203 72.79395 362.76203 157.051229
633 266.35063 197.58961 76.85076 5.796383
634 16.63435 70.01972 360.82006 162.638320
635 270.70537 193.74153 73.79200 5.530949
636 17.41203 72.79395 362.76203 157.051229
637 266.35063 197.58961 76.85076 5.796383
638 16.63435 70.01972 360.82006 162.638320
639 270.70537 193.74153 73.79200 5.530949
640 17.41203 72.79395 362.76203 157.051229
641 266.35063 197.58961 76.85076 5.796383
642 16.63435 70.01972 360.82006 162.638320
643 270.70537 193.74153 73.79200 5.530949
644 17.41203 72.79395 362.76203 157.051229
645 266.35063 197.58961 76.85076 5.796383
646 16.63435 70.01972 360.82006 162.638320
647 270.70537 193.74153 73.79200 5.530949
648 17.41203 72.79395 362.76203 157.051229
649 266.35063 197.58961 76.85076 5.796383
650 16.63435 70.01972 360.82006 162.638320
651 270.70537 193.74153 73.79200 5.530949
652 17.41203 72.79395 362.76203 157.051229
653 266.35063 197.58961 76.85076 5.796383
654 16.63435 70.01972 360.82006 162.638320
655 270.70537 193.74153 73.79200 5.530949
656 17.41203 72.79395 362.76203 157.051229
657 266.35063 197.58961 76.85076 5.796383
658 16.63435 70.01972 360.82006 162.638320
659 270.70537 193.74153 73.79200 5.530949
660 17.41203 72.79395 362.76203 157.051229
661 266.35063 197.58961 76.85076 5.796383
662 16.63435 70.01972 360.82006 162.638320
663 270.70537 193.74153 73.79200 5.530949
664 17.41203 72.79395 362.76203 157.051229
665 266.35063 197.58961 76.85076 5.796383
666 16.63435 70.01972 360.82006 162.638320
667 270.70537 193.74153 73.79200 5.530949
668 17.41203 72.79395 362.76203 157.051229
669 266.35063 197.58961 76.85076 5.796383
670 16.63435 70.01972 360.82006 162.638320
671 270.70537 193.74153 73.79200 5.530949
672 17.41203 72.79395 362.76203 157.051229
673 266.35063 197.58961 76.85076 5.796383
674 16.63435 70.01972 360.82006 162.638320
675 270.70537 193.74153 73.79200 5.530949
676 17.41203 72.79395 362.76203 157.051229
677 266.35063 197.58961 76.85076 5.796383
678 16.63435 70.01972 360.82006 162.638320
679 270.70537 193.74153 73.79200 5.530949
680 17.41203 72.79395 362.76203 157.051229
681 266.35063 197.58961 76.85076 5.796383
682 16.63435 70.01972 360.82006 162.638320
683 270.70537 193.74153 73.79200 5.530949
684 17.41203 72.79395 362.76203 157.051229
685 266.35063 197.58961 76.85076 5.796383
686 16.63435 70.01972 360.82006 162.638320
687 270.70537 193.74153 73.79200 5.530949
688 17.41203 72.79395 362.76203 157.051229
689 266.35063 197.58961 76.85076 5.796383
690 16.63435 70.01972 360.82006 162.638320
691 270.70537 193.74153 73.79200 5.530949
692 17.41203 72.79395 362.76203 157.051229
693 266.35063 197.58961 76.85076 5.796383
694 16.63435 70.01972 360.82006 162.638320
695 270.70537 193.74153 73.79200 5.530949
696 17.41203 72.79395 362.76203 157.051229
697 266.35063 197.58961 76.85076 5.796383
698 16.63435 70.01972 360.82006 162.638320
699 270.70537 193.74153 73.79200 5.530949
700 17.41203 72.79395 362.76203 157.051229
701 266.35063 197.58961 76.85076 5.796383
702 16.63435 70.01972 360.82006 162.638320
703 270.70537 193.74153 73.79200 5.530949
704 17.41203 72.79395 362.76203 157.051229
705 266.35063 197.58961 76.85076 5.796383
706 16.63435 70.01972 360.82006 162.638320
707 270.70537 193.74153 73.79200 5.530949
708 17.41203 72.79395 362.76203 157.051229
709 266.35063 197.58961 76.85076 5.796383
710 16.63435 70.01972 360.82006 162.638320
711 270.70537 193.74153 73.79200 5.530949
712 17.41203 72.79395 362.76203 157.051229
713 266.35063 197.58961 76.85076 5.796383
714 16.63435 70.01972 360.82006 162.638320
715 270.70537 193.74153 73.79200 5.530949
716 17.41203 72.79395 362.76203 157.051229
717 266.35063 197.58961 76.85076 5.796383
718 16.63435 70.01972 360.82006 162.638320
719 270.70537 193.74153 73.79200 5.530949
720 17.41203 72.79395 362.76203 157.051229
721 266.35063 197.58961 76.85076 5.796383
722 16.63435 70.01972 360.82006 162.638320
723 270.70537 193.74153 73.79200 5.530949
724 17.41203 72.79395 362.76203 157.051229
725 266.35063 197.58961 76.85076 5.796383
726 16.63435 70.01972 360.82006 162.638320
727 270.70537 193.74153 73.79200 5.530949
728 17.41203 72.79395 362.76203 157.051229
729 266.35063 197.58961 76.85076 5.796383
730 16.63435 70.01972 360.82006 162.638320
731 270.70537 193.74153 73.79200 5.530949
732 17.41203 72.79395 362.76203 157.051229
733 266.35063 197.58961 76.85076 5.796383
734 16.63435 70.01972 360.82006 162.638320
735 270.70537 193.74153 73.79200 5.530949
736 17.41203 72.79395 362.76203 157.051229
737 266.35063 197.58961 76.85076 5.796383
738 16.63435 70.01972 360.82006 162.638320
739 270.70537 193.74153 73.79200 5.530949
740 17.41203 72.79395 362.76203 157.051229
741 266.35063 197.58961 76.85076 5.796383
742 16.63435 70.01972 360.82006 162.638320
743 270.70537 193.74153 73.79200 5.530949
744 17.41203 72.79395 362.76203 157.051229
745 266.35063 197.58961 76.85076 5.796383
746 16.63435 70.01972 360.82006 162.638320
747 270.70537 193.74153 73.79200 5.530949
748 17.41203 72.79395 362.76203 157.051229
749 266.35063 197.58961 76.85076 5.796383
750 16.63435 70.01972 360.82006 162.638320
751 270.70537 193.74153 73.79200 5.530949
752 17.41203 72.79395 362.76203 157.051229
753 266.35063 197.58961 76.85076 5.796383
754 16.63435 70.01972 360.82006 162.638320
755 270.70537 193.74153 73.79200 5.530949
756 17.41203 72.79395 362.76203 157.051229
757 266.35063 197.58961 76.85076 5.796383
758 16.63435 70.01972 360.82006 162.638320
759 270.70537 193.74153 73.79200 5.530949
760 17.41203 72.79395 362.76203 157.051229
761 266.35063 197.58961 76.85076 5.796383
762 16.63435 70.01972 360.82006 162.638320
763 270.70537 193.74153 73.79200 5.530949
764 17.41203 72.79395 362.76203 157.051229
765 266.35063 197.58961 76.85076 5.796383
766 16.63435 70.01972 360.82006 162.638320
767 270.70537 193.74153 73.79200 5.530949
768 17.41203 72.79395 362.76203 157.051229
769 266.35063 197.58961 76.85076 5.796383
770 16.63435 70.01972 360.82006 162.638320
771 270.70537 193.74153 73.79200 5.530949
772 17.41203 72.79395 362.76203 157.051229
773 266.35063 197.58961 76.85076 5.796383
774 16.63435 70.01972 360.82006 162.638320
775 270.70537 193.74153 73.79200 5.530949
776 17.41203 72.79395 362.76203 157.051229
777 266.35063 197.58961 76.85076 5.796383
778 16.63435 70.01972 360.82006 162.638320
779 270.70537 193.74153 73.79200 5.530949
780 17.41203 72.79395 362.76203 157.051229
781 266.35063 197.58961 76.85076 5.796383
782 16.63435 70.01972 360.82006 162.638320
783 270.70537 193.74153 73.79200 5.530949
784 17.41203 72.79395 362.76203 157.051229
785 266.35063 197.58961 76.85076 5.796383
786 16.63435 70.01972 360.82006 162.638320
787 270.70537 193.74153 73.79200 5.530949
788 17.41203 72.79395 362.76203 157.051229
789 266.35063 197.58961 76.85076 5.796383
790 16.63435 70.01972 360.82006 162.638320
791 270.70537 193.74153 73.79200 5.530949
792 17.41203 72.79395 362.76203 157.051229
793 266.35063 197.58961 76.85076 5.796383
794 16.63435 70.01972 360.82006 162.638320
795 270.70537 193.74153 73.79200 5.530949
796 17.41203 72.79395 362.76203 157.051229
797 266.35063 197.58961 76.85076 5.796383
798 16.63435 70.01972 360.82006 162.638320
799 270.70537 193.74153 73.79200 5.530949
800 17.41203 72.79395 362.76203 157.051229
801 266.35063 197.58961 76.85076 5.796383
802 16.63435 70.01972 360.82006 162.638320
803 270.70537 193.74153 73.79200 5.530949
804 17.41203 72.79395 362.76203 157.051229
805 266.35063 197.58961 76.85076 5.796383
806 16.63435 70.01972 360.82006 162.638320
807 270.70537 193.74153 73.79200 5.530949
808 17.41203 72.79395 362.76203 157.051229
809 266.35063 197.58961 76.85076 5.796383
810 16.63435 70.01972 360.82006 162.638320
811 270.70537 193.74153 73.79200 5.530949
812 17.41203 72.79395 362.76203 157.051229
813 266.35063 197.58961 76.85076 5.796383
814 16.63435 70.01972 360.82006 162.638320
815 270.70537 193.74153 73.79200 5.530949
816 17.41203 72.79395 362.76203 157.051229
817 266.35063 197.58961 76.85076 5.796383
818 16.63435 70.01972 360.82006 162.638320
819 270.70537 193.74153 73.79200 5.530949
820 17.41203 72.79395 362.76203 157.051229
821 266.35063 197.58961 76.85076 5.796383
822 16.63435 70.01972 360.82006 162.638320
823 270.70537 193.74153 73.79200 5.530949
824 17.41203 72.79395 362.76203 157.051229
825 266.35063 197.58961 76.85076 5.796383
826 16.63435 70.01972 360.82006 162.638320
827 270.70537 193.74153 73.79200 5.530949
828 17.41203 72.79395 362.76203 157.051229
829 266.35063 197.58961 76.85076 5.796383
830 16.63435 70.01972 360.82006 162.638320
831 270.70537 193.74153 73.79200 5.530949
832 17.41203 72.79395 362.76203 157.051229
833 266.35063 197.58961 76.85076 5.796383
834 16.63435 70.01972 360.82006 162.638320
835 270.70537 193.74153 73.79200 5.530949
836 17.41203 72.79395 362.76203 157.051229
837 266.35063 197.58961 76.85076 5.796383
838 16.63435 70.01972 360.82006 162.638320
839 270.70537 193.74153 73.79200 5.530949
840 17.41203 72.79395 362.76203 157.051229
841 266.35063 197.58961 76.85076 5.796383
842 16.63435 70.01972 360.82006 162.638320
843 270.70537 193.74153 73.79200 5.530949
844 17.41203 72.79395 362.76203 157.051229
845 266.35063 197.58961 76.85076 5.796383
846 16.63435 70.01972 360.82006 162.638320
847 270.70537 193.74153 73.79200 5.530949
848 17.41203 72.79395 362.76203 157.051229
849 266.35063 197.58961 76.85076 5.796383
850 16.63435 70.01972 360.82006 162.638320
851 270.70537 193.74153 73.79200 5.530949
852 17.41203 72.79395 362.76203 157.051229
853 266.35063 197.58961 76.85076 5.796383
854 16.63435 70.01972 360.82006 162.638320
855 270.70537 193.74153 73.79200 5.530949
856 17.41203 72.79395 362.76203 157.051229
857 266.35063 197.58961 76.85076 5.796383
858 16.63435 70.01972 360.82006 162.638320
859 270.70537 193.74153 73.79200 5.530949
860 17.41203 72.79395 362.76203 157.051229
861 266.35063 197.58961 76.85076 5.796383
862 16.63435 70.01972 360.82006 162.638320
863 270.70537 193.74153 73.79200 5.530949
864 17.41203 72.79395 362.76203 157.051229
865 266.35063 197.58961 76.85076 5.796383
866 16.63435 70.01972 360.82006 162.638320
867 270.70537 193.74153 73.79200 5.530949
868 17.41203 72.79395 362.76203 157.051229
869 266.35063 197.58961 76.85076 5.796383
870 16.63435 70.01972 360.82006 162.638320
871 270.70537 193.74153 73.79200 5.530949
872 17.41203 72.79395 362.76203 157.051229
873 266.35063 197.58961 76.85076 5.796383
874 16.63435 70.01972 360.82006 162.638320
875 270.70537 193.74153 73.79200 5.530949
876 17.41203 72.79395 362.76203 157.051229
877 266.35063 197.58961 76.85076 5.796383
878 16.63435 70.01972 360.82006 162.638320
879 270.70537 193.74153 73.79200 5.530949
880 17.41203 72.79395 362.76203 157.051229
881 266.35063 197.58961 76.85076 5.796383
882 16.63435 70.01972 360.82006 162.638320
883 270.70537 193.74153 73.79200 5.530949
884 17.41203 72.79395 362.76203 157.051229
885 266.35063 197.58961 76.85076 5.796383
886 16.63435 70.01972 360.82006 162.638320
887 270.70537 193.74153 73.79200 5.530949
888 17.41203 72.79395 362.76203 157.051229
889 266.35063 197.58961 76.85076 5.796383
890 16.63435 70.01972 360.82006 162.638320
891 270.70537 193.74153 73.79200 5.530949
892 17.41203 72.79395 362.76203 157.051229
893 266.35063 197.58961 76.85076 5.796383
894 16.63435 70.01972 360.82006 162.638320
895 270.70537 193.74153 73.79200 5.530949
896 17.41203 72.79395 362.76203 157.051229
897 266.35063 197.58961 76.85076 5.796383
898 16.63435 70.01972 360.82006 162.638320
899 270.70537 193.74153 73.79200 5.530949
900 17.41203 72.79395 362.76203 157.051229
901 266.35063 197.58961 76.85076 5.796383
902 16.63435 70.01972 360.82006 162.638320
903 270.70537 193.74153 73.79200 5.530949
904 17.41203 72.79395 362.76203 157.051229
905 266.35063 197.58961 76.85076 5.796383
906 16.63435 70.01972 360.82006 162.638320
907 270.70537 193.74153 73.79200 5.530949
908 17.41203 72.79395 362.76203 157.051229
909 266.35063 197.58961 76.85076 5.796383
910 16.63435 70.01972 360.82006 162.638320
911 270.70537 193.74153 73.79200 5.530949
912 17.41203 72.79395 362.76203 157.051229
913 266.35063 197.58961 76.85076 5.796383
914 16.63435 70.01972 360.82006 162.638320
915 270.70537 193.74153 73.79200 5.530949
916 17.41203 72.79395 362.76203 157.051229
917 266.35063 197.58961 76.85076 5.796383
918 16.63435 70.01972 360.82006 162.638320
919 270.70537 193.74153 73.79200 5.530949
920 17.41203 72.79395 362.76203 157.051229
921 266.35063 197.58961 76.85076 5.796383
922 16.63435 70.01972 360.82006 162.638320
923 270.70537 193.74153 73.79200 5.530949
924 17.41203 72.79395 362.76203 157.051229
925 266.35063 197.58961 76.85076 5.796383
926 16.63435 70.01972 360.82006 162.638320
927 270.70537 193.74153 73.79200 5.530949
928 17.41203 72.79395 362.76203 157.051229
929 266.35063 197.58961 76.85076 5.796383
930 16.63435 70.01972 360.82006 162.638320
931 270.70537 193.74153 73.79200 5.530949
932 17.41203 72.79395 362.76203 157.051229
933 266.35063 197.58961 76.85076 5.796383
934 16.63435 70.01972 360.82006 162.638320
935 270.70537 193.74153 73.79200 5.530949
936 17.41203 72.79395 362.76203 157.051229
937 266.35063 197.58961 76.85076 5.796383
938 16.63435 70.01972 360.82006 162.638320
939 270.70537 193.74153 73.79200 5.530949
940 17.41203 72.79395 362.76203 157.051229
941 266.35063 197.58961 76.85076 5.796383
942 16.63435 70.01972 360.82006 162.638320
943 270.70537 193.74153 73.79200 5.530949
944 17.41203 72.79395 362.76203 157.051229
945 266.35063 197.58961 76.85076 5.796383
946 16.63435 70.01972 360.82006 162.638320
947 270.70537 193.74153 73.79200 5.530949
948 17.41203 72.79395 362.76203 157.051229
949 266.35063 197.58961 76.85076 5.796383
950 16.63435 70.01972 360.82006 162.638320
951 270.70537 193.74153 73.79200 5.530949
952 17.41203 72.79395 362.76203 157.051229
953 266.35063 197.58961 76.85076 5.796383
954 16.63435 70.01972 360.82006 162.638320
955 270.70537 193.74153 73.79200 5.530949
956 17.41203 72.79395 362.76203 157.051229
957 266.35063 197.58961 76.85076 5.796383
958 16.63435 70.01972 360.82006 162.638320
959 270.70537 193.74153 73.79200 5.530949
960 17.41203 72.79395 362.76203 157.051229
961 266.35063 197.58961 76.85076 5.796383
962 16.63435 70.01972 360.82006 162.638320
963 270.70537 193.74153 73.79200 5.530949
964 17.41203 72.79395 362.76203 157.051229
965 266.35063 197.58961 76.85076 5.796383
966 16.63435 70.01972 360.82006 162.638320
967 270.70537 193.74153 73.79200 5.530949
968 17.41203 72.79395 362.76203 157.051229
969 266.35063 197.58961 76.85076 5.796383
970 16.63435 70.01972 360.82006 162.638320
971 270.70537 193.74153 73.79200 5.530949
972 17.41203 72.79395 362.76203 157.051229
973 266.35063 197.58961 76.85076 5.796383
974 16.63435 70.01972 360.82006 162.638320
975 270.70537 193.74153 73.79200 5.530949
976 17.41203 72.79395 362.76203 157.051229
977 266.35063 197.58961 76.85076 5.796383
978 16.63435 70.01972 360.82006 162.638320
979 270.70537 193.74153 73.79200 5.530949
980 17.41203 72.79395 362.76203 157.051229
981 266.35063 197.58961 76.85076 5.796383
982 16.63435 70.01972 360.82006 162.638320
983 270.70537 193.74153 73.79200 5.530949
984 17.41203 72.79395 362.76203 157.051229
985 266.35063 197.58961 76.85076 5.796383
986 16.63435 70.01972 360.82006 162.638320
987 270.70537 193.74153 73.79200 5.530949
988 17.41203 72.79395 362.76203 157.051229
989 266.35063 197.58961 76.85076 5.796383
990 16.63435 70.01972 360.82006 162.638320
991 270.70537 193.74153 73.79200 5.530949
992 17.41203 72.79395 362.76203 157.051229
993 266.35063 197.58961 76.85076 5.796383
994 16.63435 70.01972 360.82006 162.638320
995 270.70537 193.74153 73.79200 5.530949
996 17.41203 72.79395 362.76203 157.051229
997 266.35063 197.58961 76.85076 5.796383
998 16.63435 70.01972 360.82006 162.638320
999 270.70537 193.74153 73.79200 5.530949
1000 17.41203 72.79395 362.76203 157.051229
fitG <- vglm(cbind(y1, y2, y3, y4, y5) ~ gender, family = cumulative(parallel = T),
data = politics)
summary(fitG)
Call:
vglm(formula = cbind(y1, y2, y3, y4, y5) ~ gender, family = cumulative(parallel = T),
data = politics)
Pearson residuals:
logitlink(P[Y<=1]) logitlink(P[Y<=2]) logitlink(P[Y<=3])
1 0.7597 2.630 7.617
2 -1.9804 -4.638 -9.106
3 2.3841 5.030 5.566
4 -1.6530 -4.616 -7.692
logitlink(P[Y<=4])
1 3.048
2 -3.548
3 2.525
4 -3.495
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept):1 -2.54175 0.16421 -15.478 < 0.0000000000000002 ***
(Intercept):2 -0.55945 0.10036 -5.574 0.0000000248 ***
(Intercept):3 0.42279 0.09929 4.258 0.0000206120 ***
(Intercept):4 2.19962 0.14055 15.651 < 0.0000000000000002 ***
gendermale -0.18894 0.14138 -1.336 0.181
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Names of linear predictors: logitlink(P[Y<=1]), logitlink(P[Y<=2]),
logitlink(P[Y<=3]), logitlink(P[Y<=4])
Residual deviance: 413.054 on 11 degrees of freedom
Log-likelihood: -236.8266 on 11 degrees of freedom
Number of Fisher scoring iterations: 5
No Hauck-Donner effect found in any of the estimates
Exponentiated coefficients:
gendermale
0.8278392
Likelihood ratio test
Model 1: cbind(y1, y2, y3, y4, y5) ~ party + gender
Model 2: cbind(y1, y2, y3, y4, y5) ~ gender
#Df LogLik Df Chisq Pr(>Chisq)
1 10 -35.203
2 11 -236.827 1 403.25 < 0.00000000000000022 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
2.5 % 97.5 %
(Intercept):1 -2.46596771 -1.8014863
(Intercept):2 -0.05464962 0.3937706
(Intercept):3 1.56835767 2.1616181
(Intercept):4 4.20347943 5.1226824
partyrepub -4.07163810 -3.2178566
gendermale -0.24638939 0.3414038
fitP <- vglm(cbind(y1, y2, y3, y4, y5) ~ party, family = cumulative(parallel = T),
data = politics)
summary(fitP)
Call:
vglm(formula = cbind(y1, y2, y3, y4, y5) ~ party, family = cumulative(parallel = T),
data = politics)
Pearson residuals:
logitlink(P[Y<=1]) logitlink(P[Y<=2]) logitlink(P[Y<=3])
1 -0.3225 -0.7410 0.5691
2 -0.7109 0.6058 -0.1568
3 0.6127 1.1209 -0.4354
4 -0.5147 -1.3155 -0.2420
logitlink(P[Y<=4])
1 -1.13849
2 0.65161
3 -1.25496
4 -0.06279
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept):1 -2.10343 0.15795 -13.317 <0.0000000000000002 ***
(Intercept):2 0.18683 0.09892 1.889 0.0589 .
(Intercept):3 1.87472 0.13958 13.432 <0.0000000000000002 ***
(Intercept):4 4.66772 0.22813 20.460 <0.0000000000000002 ***
partyrepub -3.62900 0.21742 -16.691 <0.0000000000000002 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Names of linear predictors: logitlink(P[Y<=1]), logitlink(P[Y<=2]),
logitlink(P[Y<=3]), logitlink(P[Y<=4])
Residual deviance: 9.9069 on 11 degrees of freedom
Log-likelihood: -35.253 on 11 degrees of freedom
Number of Fisher scoring iterations: 4
No Hauck-Donner effect found in any of the estimates
Exponentiated coefficients:
partyrepub
0.02654265
Likelihood ratio test
Model 1: cbind(y1, y2, y3, y4, y5) ~ party + gender
Model 2: cbind(y1, y2, y3, y4, y5) ~ party
#Df LogLik Df Chisq Pr(>Chisq)
1 10 -35.203
2 11 -35.253 1 0.0997 0.7522
# PO: Happiness and Family Income pp.172-174
happy <- read.table("/Users/Patrick/Dropbox/data/agresti/Happy.dat", header = T)
fit <- vglm(cbind(y1, y2, y3) ~ income, family = cumulative(parallel = T), data = happy)
summary(fit)
Call:
vglm(formula = cbind(y1, y2, y3) ~ income, family = cumulative(parallel = T),
data = happy)
Pearson residuals:
logitlink(P[Y<=1]) logitlink(P[Y<=2])
1 0.4175 -0.06952
2 -0.6911 -0.04246
3 0.5631 0.21889
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept):1 -1.1023 0.2754 -4.003 0.00006251 ***
(Intercept):2 1.3048 0.2775 4.701 0.00000259 ***
income -0.2668 0.1510 -1.768 0.0771 .
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Names of linear predictors: logitlink(P[Y<=1]), logitlink(P[Y<=2])
Residual deviance: 1.0168 on 3 degrees of freedom
Log-likelihood: -14.5664 on 3 degrees of freedom
Number of Fisher scoring iterations: 3
No Hauck-Donner effect found in any of the estimates
Exponentiated coefficients:
income
0.7657883
fit0 <- vglm(cbind(y1, y2, y3) ~ 1, family = cumulative(parallel = T), data = happy)
lrtest(fit, fit0)Likelihood ratio test
Model 1: cbind(y1, y2, y3) ~ income
Model 2: cbind(y1, y2, y3) ~ 1
#Df LogLik Df Chisq Pr(>Chisq)
1 3 -14.566
2 4 -16.121 1 3.109 0.07786 .
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Call:
vglm(formula = cbind(y1, y2, y3) ~ factor(income), family = multinomial,
data = happy)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept):1 -0.1957 0.2219 -0.882 0.377753
(Intercept):2 0.6931 0.1826 3.797 0.000147 ***
factor(income)2:1 -0.6107 0.3273 -1.866 0.062023 .
factor(income)2:2 -0.1859 0.2489 -0.747 0.455104
factor(income)3:1 -0.5774 0.5411 -1.067 0.285936
factor(income)3:2 -0.3677 0.4072 -0.903 0.366496
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Names of linear predictors: log(mu[,1]/mu[,3]), log(mu[,2]/mu[,3])
Residual deviance: -0.000000000000004108 on 0 degrees of freedom
Log-likelihood: -14.058 on 0 degrees of freedom
Number of Fisher scoring iterations: 4
No Hauck-Donner effect found in any of the estimates
Reference group is level 3 of the response
Likelihood ratio test
Model 1: cbind(y1, y2, y3) ~ factor(income)
Model 2: cbind(y1, y2, y3) ~ 1
#Df LogLik Df Chisq Pr(>Chisq)
1 0 -14.058
2 4 -16.121 4 4.1258 0.3892
Call:
vglm(formula = cbind(y1, y2, y3) ~ income, family = multinomial,
data = happy)
Pearson residuals:
log(mu[,1]/mu[,3]) log(mu[,2]/mu[,3])
1 0.2688 -0.06912
2 -0.5878 0.15301
3 0.7148 -0.18204
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept):1 0.1754 0.4191 0.418 0.67559
(Intercept):2 0.8704 0.3240 2.686 0.00723 **
income:1 -0.4247 0.2428 -1.749 0.08033 .
income:2 -0.1805 0.1787 -1.010 0.31242
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Names of linear predictors: log(mu[,1]/mu[,3]), log(mu[,2]/mu[,3])
Residual deviance: 0.9568 on 2 degrees of freedom
Log-likelihood: -14.5364 on 2 degrees of freedom
Number of Fisher scoring iterations: 4
No Hauck-Donner effect found in any of the estimates
Reference group is level 3 of the response
Likelihood ratio test
Model 1: cbind(y1, y2, y3) ~ income
Model 2: cbind(y1, y2, y3) ~ 1
#Df LogLik Df Chisq Pr(>Chisq)
1 2 -14.536
2 4 -16.121 2 3.1691 0.205
# Chronic Respiratory Disease
airPollHigh <- c(rep(0, 6), rep(1, 6))
jobExposureY <- rep(c(rep(0, 3), rep(1, 3)), 2)
smokestatusEx <- rep(c(0, 1, 0), 4)
smokestatusCurrent <- rep(c(0, 0, 1), 4)
y1 <- c(158, 167, 307, 26, 38, 94, 94, 67, 184, 32, 39, 77)
y2 <- c(9, 19, 102, 5, 12, 48, 7, 8, 65, 3, 11, 48)
y3 <- c(5, 5, 83, 5, 4, 46, 5, 4, 33, 6, 4, 39)
y4 <- c(0, 3, 68, 1, 4, 60, 1, 3, 36, 1, 2, 51)
ChronRespDis <- data.frame(airPollHigh, jobExposureY, smokestatusEx, smokestatusCurrent,
y1, y2, y3, y4)
fit <- vglm(cbind(y1, y2, y3, y4) ~ airPollHigh + jobExposureY + smokestatusEx +
smokestatusCurrent, family = cumulative(parallel = T), data = ChronRespDis)
summary(fit)
Call:
vglm(formula = cbind(y1, y2, y3, y4) ~ airPollHigh + jobExposureY +
smokestatusEx + smokestatusCurrent, family = cumulative(parallel = T),
data = ChronRespDis)
Pearson residuals:
Min 1Q Median 3Q Max
logitlink(P[Y<=1]) -0.9786 -0.6485 -0.06329 0.09382 1.164
logitlink(P[Y<=2]) -2.0789 -0.9668 0.23074 0.77460 1.502
logitlink(P[Y<=3]) -0.4941 -0.3384 0.32979 1.04577 1.773
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept):1 2.08844 0.16329 12.790 <0.0000000000000002 ***
(Intercept):2 2.96964 0.16927 17.544 <0.0000000000000002 ***
(Intercept):3 3.89385 0.17786 21.893 <0.0000000000000002 ***
airPollHigh 0.03929 0.09370 0.419 0.6750
jobExposureY -0.86476 0.09546 -9.059 <0.0000000000000002 ***
smokestatusEx -0.40003 0.20187 -1.982 0.0475 *
smokestatusCurrent -1.85271 0.16503 -11.227 <0.0000000000000002 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Names of linear predictors: logitlink(P[Y<=1]), logitlink(P[Y<=2]),
logitlink(P[Y<=3])
Residual deviance: 29.9969 on 29 degrees of freedom
Log-likelihood: -85.8245 on 29 degrees of freedom
Number of Fisher scoring iterations: 4
No Hauck-Donner effect found in any of the estimates
Exponentiated coefficients:
airPollHigh jobExposureY smokestatusEx
1.0400744 0.4211522 0.6703009
smokestatusCurrent
0.1568115
# p.195
HappyHeaven <- read.table("http://www.stat.ufl.edu/~aa/cat/data/HappyHeaven.dat",
header = T)
HappyHeaven happy heaven count
1 not no 32
2 not yes 190
3 pretty no 113
4 pretty yes 611
5 very no 51
6 very yes 326
heaven
happy no yes
not 32 190
pretty 113 611
very 51 326
fitLogLinear <- glm(count ~ happy + heaven, family = poisson, data = HappyHeaven)
summary(fitLogLinear)
Call:
glm(formula = count ~ happy + heaven, family = poisson, data = HappyHeaven)
Deviance Residuals:
1 2 3 4 5 6
-0.15570 0.06459 0.54947 -0.23152 -0.65897 0.27006
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 3.49313 0.09408 37.13 < 0.0000000000000002 ***
happypretty 1.18211 0.07672 15.41 < 0.0000000000000002 ***
happyvery 0.52957 0.08460 6.26 0.000000000386 ***
heavenyes 1.74920 0.07739 22.60 < 0.0000000000000002 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for poisson family taken to be 1)
Null deviance: 1019.87238 on 5 degrees of freedom
Residual deviance: 0.89111 on 2 degrees of freedom
AIC: 49.504
Number of Fisher Scoring iterations: 3
fitLogLineari <- glm(count ~ happy + heaven + happy * heaven, family = poisson,
data = HappyHeaven)
summary(fitLogLineari)
Call:
glm(formula = count ~ happy + heaven + happy * heaven, family = poisson,
data = HappyHeaven)
Deviance Residuals:
[1] 0 0 0 0 0 0
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 3.46574 0.17678 19.605 < 0.0000000000000002 ***
happypretty 1.26165 0.20025 6.300 0.000000000297 ***
happyvery 0.46609 0.22552 2.067 0.0388 *
heavenyes 1.78129 0.19108 9.322 < 0.0000000000000002 ***
happypretty:heavenyes -0.09358 0.21679 -0.432 0.6660
happyvery:heavenyes 0.07378 0.24329 0.303 0.7617
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for poisson family taken to be 1)
Null deviance: 1019.872382855081355046 on 5 degrees of freedom
Residual deviance: 0.000000000000029532 on 0 degrees of freedom
AIC: 52.613
Number of Fisher Scoring iterations: 2
# Dayton, Ohio High Schoolers - A, C and M, p.198
druggy <- read.table("http://www.stat.ufl.edu/~aa/cat/data/Substance.dat", header = T)
druggy alcohol cigarettes marijuana count
1 yes yes yes 911
2 yes yes no 538
3 yes no yes 44
4 yes no no 456
5 no yes yes 3
6 no yes no 43
7 no no yes 2
8 no no no 279
druggy$A <- druggy$alcohol
druggy$C <- druggy$cigarettes
druggy$M <- druggy$marijuana
fitHAmodel <- glm(count ~ A + C + M + A * C + A * M + C * M, family = poisson,
data = druggy)
druggy$resHAmodel <- rstandard(fitHAmodel, type = "pearson")
summary(fitHAmodel)
Call:
glm(formula = count ~ A + C + M + A * C + A * M + C * M, family = poisson,
data = druggy)
Deviance Residuals:
1 2 3 4 5 6 7
0.02044 -0.02658 -0.09256 0.02890 -0.33428 0.09452 0.49134
8
-0.03690
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 5.63342 0.05970 94.361 < 0.0000000000000002 ***
Ayes 0.48772 0.07577 6.437 0.000000000122 ***
Cyes -1.88667 0.16270 -11.596 < 0.0000000000000002 ***
Myes -5.30904 0.47520 -11.172 < 0.0000000000000002 ***
Ayes:Cyes 2.05453 0.17406 11.803 < 0.0000000000000002 ***
Ayes:Myes 2.98601 0.46468 6.426 0.000000000131 ***
Cyes:Myes 2.84789 0.16384 17.382 < 0.0000000000000002 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for poisson family taken to be 1)
Null deviance: 2851.46098 on 7 degrees of freedom
Residual deviance: 0.37399 on 1 degrees of freedom
AIC: 63.417
Number of Fisher Scoring iterations: 4
fit_AC_CM <- glm(count ~ A + C + M + A * C + C * M, family = poisson, data = druggy)
summary(fit_AC_CM)
Call:
glm(formula = count ~ A + C + M + A * C + C * M, family = poisson,
data = druggy)
Deviance Residuals:
1 2 3 4 5 6 7 8
0.8401 -1.0667 2.4964 -0.6743 -6.0678 5.0235 -4.5440 0.8867
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 5.57765 0.06032 92.463 < 0.0000000000000002 ***
Ayes 0.57625 0.07456 7.729 0.0000000000000108 ***
Cyes -2.69414 0.16257 -16.572 < 0.0000000000000002 ***
Myes -2.77123 0.15199 -18.233 < 0.0000000000000002 ***
Ayes:Cyes 2.87373 0.16730 17.178 < 0.0000000000000002 ***
Cyes:Myes 3.22431 0.16098 20.029 < 0.0000000000000002 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for poisson family taken to be 1)
Null deviance: 2851.461 on 7 degrees of freedom
Residual deviance: 92.018 on 2 degrees of freedom
AIC: 153.06
Number of Fisher Scoring iterations: 6
Analysis of Deviance Table
Model 1: count ~ A + C + M + A * C + C * M
Model 2: count ~ A + C + M + A * C + A * M + C * M
Resid. Df Resid. Dev Df Deviance Pr(>Chi)
1 2 92.018
2 1 0.374 1 91.644 < 0.00000000000000022 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Analysis of Deviance Table (Type II tests)
Response: count
LR Chisq Df Pr(>Chisq)
A 1281.71 1 < 0.00000000000000022 ***
C 227.81 1 < 0.00000000000000022 ***
M 55.91 1 0.00000000000007575 ***
A:C 187.38 1 < 0.00000000000000022 ***
A:M 91.64 1 < 0.00000000000000022 ***
C:M 497.00 1 < 0.00000000000000022 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
fit_AM_CM <- glm(count ~ A + C + M + A * M + C * M, family = poisson, data = druggy)
summary(fit_AM_CM)
Call:
glm(formula = count ~ A + C + M + A * M + C * M, family = poisson,
data = druggy)
Deviance Residuals:
1 2 3 4 5 6 7 8
0.0584 4.5702 -0.2619 -4.3441 -0.8663 -9.7716 2.2287 6.8353
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 5.19207 0.06088 85.285 < 0.0000000000000002 ***
Ayes 1.12719 0.06412 17.579 < 0.0000000000000002 ***
Cyes -0.23512 0.05551 -4.235 0.0000228 ***
Myes -6.62092 0.47370 -13.977 < 0.0000000000000002 ***
Ayes:Myes 4.12509 0.45294 9.107 < 0.0000000000000002 ***
Cyes:Myes 3.22431 0.16098 20.029 < 0.0000000000000002 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for poisson family taken to be 1)
Null deviance: 2851.46 on 7 degrees of freedom
Residual deviance: 187.75 on 2 degrees of freedom
AIC: 248.8
Number of Fisher Scoring iterations: 5
druggy$res_AM_CM <- rstandard(fit_AM_CM, type = "pearson")
data.frame(druggy$A, druggy$C, druggy$M, druggy$count, fitted(fitHAmodel), druggy$resHAmodel,
fitted(fit_AM_CM), druggy$res_AM_CM) druggy.A druggy.C druggy.M druggy.count fitted.fitHAmodel.
1 yes yes yes 911 910.38317
2 yes yes no 538 538.61683
3 yes no yes 44 44.61683
4 yes no no 456 455.38317
5 no yes yes 3 3.61683
6 no yes no 43 42.38317
7 no no yes 2 1.38317
8 no no no 279 279.61683
druggy.resHAmodel fitted.fit_AM_CM. druggy.res_AM_CM
1 0.6333249 909.2395833 3.695518
2 -0.6333249 438.8404255 12.804588
3 -0.6333249 45.7604167 -3.695518
4 0.6333249 555.1595745 -12.804588
5 -0.6333250 4.7604167 -3.695589
6 0.6333249 142.1595745 -12.804589
7 0.6333250 0.2395833 3.695589
8 -0.6333249 179.8404255 12.804589
2.5 % 97.5 %
(Intercept) 248.1623 313.6240
Ayes 1.4050 1.8911
Cyes 0.1088 0.2062
Myes 0.0017 0.0114
Ayes:Cyes 5.6015 11.0971
Ayes:Myes 8.8140 56.6436
Cyes:Myes 12.6458 24.0693
# Maine accidents, p.204
accidents <- read.table("http://www.stat.ufl.edu/~aa/cat/data/Accidents2.dat",
header = T)
accidents$G <- accidents$gender
accidents$L <- accidents$location
accidents$S <- accidents$seatbelt
accidents$I <- accidents$injury
accidents gender location seatbelt injury count G L S I
1 female rural no no 3246 female rural no no
2 female rural no yes 973 female rural no yes
3 female rural yes no 6134 female rural yes no
4 female rural yes yes 757 female rural yes yes
5 female urban no no 7287 female urban no no
6 female urban no yes 996 female urban no yes
7 female urban yes no 11587 female urban yes no
8 female urban yes yes 759 female urban yes yes
9 male rural no no 6123 male rural no no
10 male rural no yes 1084 male rural no yes
11 male rural yes no 6693 male rural yes no
12 male rural yes yes 513 male rural yes yes
13 male urban no no 10381 male urban no no
14 male urban no yes 812 male urban no yes
15 male urban yes no 10969 male urban yes no
16 male urban yes yes 380 male urban yes yes
Call:
glm(formula = count ~ G + L + S + I, family = poisson, data = accidents)
Deviance Residuals:
Min 1Q Median 3Q Max
-26.8552 -7.3020 0.5095 7.2791 19.4902
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 8.480603 0.008683 976.68 <2e-16 ***
Gmale 0.152155 0.007653 19.88 <2e-16 ***
Lurban 0.525589 0.007896 66.57 <2e-16 ***
Syes 0.201277 0.007669 26.24 <2e-16 ***
Iyes -2.297472 0.013244 -173.47 <2e-16 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for poisson family taken to be 1)
Null deviance: 61709.5 on 15 degrees of freedom
Residual deviance: 2792.8 on 11 degrees of freedom
AIC: 2956.2
Number of Fisher Scoring iterations: 4
fitHA <- glm(count ~ G + L + S + I + G * L + G * S + G * I + L * S + L * I +
S * I, family = poisson, data = accidents)
summary(fitHA)
Call:
glm(formula = count ~ G + L + S + I + G * L + G * S + G * I +
L * S + L * I + S * I, family = poisson, data = accidents)
Deviance Residuals:
1 2 3 4 5 6 7
-1.87206 -0.50333 1.91168 -0.89501 1.42101 0.09462 -1.49166
8 9 10 11 12 13 14
1.39155 0.99713 1.41493 -1.43845 -0.23069 -0.88563 -1.14680
15 16
1.25748 -0.38522
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 8.11786 0.01453 558.535 < 2e-16 ***
Gmale 0.58918 0.01620 36.359 < 2e-16 ***
Lurban 0.75930 0.01602 47.399 < 2e-16 ***
Syes 0.57924 0.01623 35.692 < 2e-16 ***
Iyes -1.22138 0.02637 -46.320 < 2e-16 ***
Gmale:Lurban -0.20992 0.01612 -13.019 < 2e-16 ***
Gmale:Syes -0.45992 0.01568 -29.328 < 2e-16 ***
Gmale:Iyes -0.54053 0.02722 -19.859 < 2e-16 ***
Lurban:Syes -0.08493 0.01619 -5.244 0.000000157 ***
Lurban:Iyes -0.75503 0.02695 -28.017 < 2e-16 ***
Syes:Iyes -0.81400 0.02762 -29.473 < 2e-16 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for poisson family taken to be 1)
Null deviance: 61709.521 on 15 degrees of freedom
Residual deviance: 23.351 on 5 degrees of freedom
AIC: 198.81
Number of Fisher Scoring iterations: 3
fit3 <- glm(count ~ G + L + S + I + G * L + G * S + G * I + L * S + L * I +
S * I + G * L * S + G * L * I + G * S * I + L * S * I, family = poisson,
data = accidents)
summary(fit3)
Call:
glm(formula = count ~ G + L + S + I + G * L + G * S + G * I +
L * S + L * I + S * I + G * L * S + G * L * I + G * S * I +
L * S * I, family = poisson, data = accidents)
Deviance Residuals:
1 2 3 4 5 6 7
-0.17993 0.33015 0.13110 -0.37131 0.12027 -0.32405 -0.09531
8 9 10 11 12 13 14
0.37418 0.13122 -0.31071 -0.12537 0.45614 -0.10069 0.36166
15 16
0.09801 -0.52177
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 8.08834 0.01731 467.290 < 2e-16 ***
Gmale 0.62979 0.02129 29.588 < 2e-16 ***
Lurban 0.80410 0.02071 38.831 < 2e-16 ***
Syes 0.63159 0.02128 29.681 < 2e-16 ***
Iyes -1.21855 0.03467 -35.150 < 2e-16 ***
Gmale:Lurban -0.27351 0.02579 -10.607 < 2e-16 ***
Gmale:Syes -0.53937 0.02710 -19.903 < 2e-16 ***
Gmale:Iyes -0.50174 0.04423 -11.344 < 2e-16 ***
Lurban:Syes -0.16551 0.02561 -6.463 1.03e-10 ***
Lurban:Iyes -0.75989 0.04460 -17.038 < 2e-16 ***
Syes:Iyes -0.85855 0.04673 -18.373 < 2e-16 ***
Gmale:Lurban:Syes 0.12646 0.03288 3.846 0.00012 ***
Gmale:Lurban:Iyes -0.08176 0.05469 -1.495 0.13491
Gmale:Syes:Iyes -0.01144 0.05603 -0.204 0.83821
Lurban:Syes:Iyes 0.09685 0.05547 1.746 0.08080 .
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for poisson family taken to be 1)
Null deviance: 61709.5207 on 15 degrees of freedom
Residual deviance: 1.3253 on 1 degrees of freedom
AIC: 184.78
Number of Fisher Scoring iterations: 3
Analysis of Deviance Table (Type II tests)
Response: count
LR Chisq Df Pr(>Chisq)
G 396 1 < 2.2e-16 ***
L 4585 1 < 2.2e-16 ***
S 692 1 < 2.2e-16 ***
I 53243 1 < 2.2e-16 ***
G:L 170 1 < 2.2e-16 ***
G:S 868 1 < 2.2e-16 ***
G:I 405 1 < 2.2e-16 ***
L:S 28 1 0.0000001503 ***
L:I 788 1 < 2.2e-16 ***
S:I 902 1 < 2.2e-16 ***
G:L:S 15 1 0.0001187 ***
G:L:I 2 1 0.1347340
G:S:I 0 1 0.8381830
L:S:I 3 1 0.0809032 .
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
fit4 <- glm(count ~ G + L + S + I + G * L + G * S + G * I + L * S + L * I +
S * I + G * L * S, family = poisson, data = accidents)
summary(fit4)
Call:
glm(formula = count ~ G + L + S + I + G * L + G * S + G * I +
L * S + L * I + S * I + G * L * S, family = poisson, data = accidents)
Deviance Residuals:
1 2 3 4 5 6 7
-0.15190 0.27851 0.51823 -1.44646 0.16160 -0.43483 -0.42327
8 9 10 11 12 13 14
1.69037 -0.34700 0.83292 -0.05675 0.20564 0.21675 -0.76754
15 16
0.09329 -0.49684
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 8.08784 0.01654 488.884 < 2e-16 ***
Gmale 0.63640 0.02015 31.579 < 2e-16 ***
Lurban 0.80411 0.01966 40.891 < 2e-16 ***
Syes 0.62713 0.02027 30.940 < 2e-16 ***
Iyes -1.21640 0.02649 -45.918 < 2e-16 ***
Gmale:Lurban -0.28274 0.02441 -11.584 < 2e-16 ***
Gmale:Syes -0.54186 0.02590 -20.925 < 2e-16 ***
Gmale:Iyes -0.54483 0.02727 -19.982 < 2e-16 ***
Lurban:Syes -0.15752 0.02441 -6.453 1.09e-10 ***
Lurban:Iyes -0.75806 0.02697 -28.105 < 2e-16 ***
Syes:Iyes -0.81710 0.02765 -29.551 < 2e-16 ***
Gmale:Lurban:Syes 0.12858 0.03228 3.984 6.78e-05 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for poisson family taken to be 1)
Null deviance: 61709.5207 on 15 degrees of freedom
Residual deviance: 7.4645 on 4 degrees of freedom
AIC: 184.92
Number of Fisher Scoring iterations: 3
fit5 <- glm(count ~ G + L + S + I + G * L + G * S + G * I + L * S + L * I +
S * I + G * L * I, family = poisson, data = accidents)
summary(fit5)
Call:
glm(formula = count ~ G + L + S + I + G * L + G * S + G * I +
L * S + L * I + S * I + G * L * I, family = poisson, data = accidents)
Deviance Residuals:
1 2 3 4 5 6 7 8
-2.1237 0.2232 1.5747 -0.2517 1.6044 -0.6465 -1.2595 0.7526
9 10 11 12 13 14 15 16
1.2431 0.5745 -1.1770 -0.8203 -1.0793 -0.1823 1.0572 0.2683
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 8.12222 0.01466 554.207 < 2e-16 ***
Gmale 0.58165 0.01656 35.124 < 2e-16 ***
Lurban 0.75277 0.01629 46.224 < 2e-16 ***
Syes 0.57920 0.01623 35.690 < 2e-16 ***
Iyes -1.24900 0.02941 -42.472 < 2e-16 ***
Gmale:Lurban -0.19834 0.01697 -11.690 < 2e-16 ***
Gmale:Syes -0.45991 0.01568 -29.328 < 2e-16 ***
Gmale:Iyes -0.48396 0.03754 -12.892 < 2e-16 ***
Lurban:Syes -0.08488 0.01619 -5.241 0.000000159 ***
Lurban:Iyes -0.70182 0.03631 -19.327 < 2e-16 ***
Syes:Iyes -0.81393 0.02762 -29.473 < 2e-16 ***
Gmale:Lurban:Iyes -0.11762 0.05383 -2.185 0.0289 *
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for poisson family taken to be 1)
Null deviance: 61709.521 on 15 degrees of freedom
Residual deviance: 18.569 on 4 degrees of freedom
AIC: 196.03
Number of Fisher Scoring iterations: 3
fit6 <- glm(count ~ G + L + S + I + G * L + G * S + G * I + L * S + L * I +
S * I + G * S * I, family = poisson, data = accidents)
summary(fit6)
Call:
glm(formula = count ~ G + L + S + I + G * L + G * S + G * I +
L * S + L * I + S * I + G * S * I, family = poisson, data = accidents)
Deviance Residuals:
1 2 3 4 5 6 7
-1.94157 -0.30012 1.96771 -1.13125 1.31737 0.29853 -1.41353
8 9 10 11 12 13 14
1.16157 1.05786 1.19487 -1.49857 0.09192 -0.80665 -1.34275
15 16
1.18219 -0.10646
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 8.11906 0.01463 554.966 < 2e-16 ***
Gmale 0.58719 0.01644 35.712 < 2e-16 ***
Lurban 0.75931 0.01602 47.397 < 2e-16 ***
Syes 0.57731 0.01645 35.090 < 2e-16 ***
Iyes -1.22907 0.02855 -43.044 < 2e-16 ***
Gmale:Lurban -0.20993 0.01612 -13.020 < 2e-16 ***
Gmale:Syes -0.45649 0.01641 -27.816 < 2e-16 ***
Gmale:Iyes -0.52528 0.03467 -15.150 < 2e-16 ***
Lurban:Syes -0.08494 0.01619 -5.245 0.000000156 ***
Lurban:Iyes -0.75503 0.02695 -28.017 < 2e-16 ***
Syes:Iyes -0.79710 0.03644 -21.872 < 2e-16 ***
Gmale:Syes:Iyes -0.03941 0.05553 -0.710 0.478
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for poisson family taken to be 1)
Null deviance: 61709.521 on 15 degrees of freedom
Residual deviance: 22.847 on 4 degrees of freedom
AIC: 200.31
Number of Fisher Scoring iterations: 3
fit7 <- glm(count ~ G + L + S + I + G * L + G * S + G * I + L * S + L * I +
S * I + L * S * I, family = poisson, data = accidents)
summary(fit7)
Call:
glm(formula = count ~ G + L + S + I + G * L + G * S + G * I +
L * S + L * I + S * I + L * S * I, family = poisson, data = accidents)
Deviance Residuals:
1 2 3 4 5 6 7 8
-1.6873 -0.9683 1.7286 -0.2460 1.2758 0.6134 -1.3477 0.6613
9 10 11 12 13 14 15 16
1.2473 0.9358 -1.6318 0.3011 -1.0599 -0.6697 1.3971 -0.9129
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 8.11465 0.01467 552.959 < 2e-16 ***
Gmale 0.58918 0.01620 36.360 < 2e-16 ***
Lurban 0.76422 0.01630 46.879 < 2e-16 ***
Syes 0.58480 0.01658 35.271 < 2e-16 ***
Iyes -1.20338 0.02844 -42.309 < 2e-16 ***
Gmale:Lurban -0.20992 0.01612 -13.019 < 2e-16 ***
Gmale:Syes -0.45993 0.01568 -29.328 < 2e-16 ***
Gmale:Iyes -0.54059 0.02722 -19.858 < 2e-16 ***
Lurban:Syes -0.09353 0.01702 -5.496 0.0000000388 ***
Lurban:Iyes -0.79124 0.03478 -22.748 < 2e-16 ***
Syes:Iyes -0.85778 0.03839 -22.345 < 2e-16 ***
Lurban:Syes:Iyes 0.09016 0.05468 1.649 0.0992 .
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for poisson family taken to be 1)
Null deviance: 61709.521 on 15 degrees of freedom
Residual deviance: 20.633 on 4 degrees of freedom
AIC: 198.09
Number of Fisher Scoring iterations: 3
fitLogistic <- glm(I ~ G + L + S, family = binomial, weights = count, data = accidents)
summary(fitLogistic)
Call:
glm(formula = I ~ G + L + S, family = binomial, data = accidents,
weights = count)
Deviance Residuals:
Min 1Q Median 3Q Max
-44.07 -39.16 11.46 58.98 65.79
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -1.21640 0.02649 -45.92 <2e-16 ***
Gmale -0.54483 0.02727 -19.98 <2e-16 ***
Lurban -0.75806 0.02697 -28.11 <2e-16 ***
Syes -0.81710 0.02765 -29.55 <2e-16 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 41987 on 15 degrees of freedom
Residual deviance: 40082 on 12 degrees of freedom
AIC: 40090
Number of Fisher Scoring iterations: 6
# see pages 208-209 for the following approach
injury <- read.table("http://www.stat.ufl.edu/~aa/cat/data/Injury_binom.dat",
header = T)
injury$G <- injury$gender
injury$L <- injury$location
injury$S <- injury$seatbelt
injury$nn <- injury$yes + injury$no
injury$pct <- injury$yes/injury$nn
injury gender location seatbelt no yes G L S nn pct
1 female urban no 7287 996 female urban no 8283 0.12024629
2 female urban yes 11587 759 female urban yes 12346 0.06147740
3 female rural no 3246 973 female rural no 4219 0.23062337
4 female rural yes 6134 757 female rural yes 6891 0.10985343
5 male urban no 10381 812 male urban no 11193 0.07254534
6 male urban yes 10969 380 male urban yes 11349 0.03348313
7 male rural no 6123 1084 male rural no 7207 0.15040932
8 male rural yes 6693 513 male rural yes 7206 0.07119067
fitLogistic2 <- glm(pct ~ G + L + S, family = binomial, weights = nn, data = injury)
summary(fitLogistic2)
Call:
glm(formula = pct ~ G + L + S, family = binomial, data = injury,
weights = nn)
Deviance Residuals:
1 2 3 4 5 6 7 8
-0.4639 1.7426 0.3172 -1.5365 -0.7976 -0.5055 0.9023 0.2133
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -1.21640 0.02649 -45.92 <2e-16 ***
Gmale -0.54483 0.02727 -19.98 <2e-16 ***
Lurban -0.75806 0.02697 -28.11 <2e-16 ***
Syes -0.81710 0.02765 -29.55 <2e-16 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 1912.4532 on 7 degrees of freedom
Residual deviance: 7.4645 on 4 degrees of freedom
AIC: 82.167
Number of Fisher Scoring iterations: 3
# p.216 Linear by Linear Association for Sex Opinions
teenagers <- read.table("http://www.stat.ufl.edu/~aa/cat/data/Teenagers.dat",
header = T)
teenagers sex birth count
1 1 1 81
2 1 2 68
3 1 3 60
4 1 4 38
5 2 1 24
6 2 2 26
7 2 3 29
8 2 4 14
9 3 1 18
10 3 2 41
11 3 3 74
12 3 4 42
13 4 1 36
14 4 2 57
15 4 3 161
16 4 4 157
fit <- glm(count ~ factor(sex) + factor(birth) + sex:birth, family = poisson,
data = teenagers)
summary(fit)
Call:
glm(formula = count ~ factor(sex) + factor(birth) + sex:birth,
family = poisson, data = teenagers)
Deviance Residuals:
Min 1Q Median 3Q Max
-1.35834 -0.91606 0.07972 0.61648 1.57618
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 4.10684 0.08951 45.881 < 2e-16 ***
factor(sex)2 -1.64596 0.13473 -12.216 < 2e-16 ***
factor(sex)3 -1.77002 0.16464 -10.751 < 2e-16 ***
factor(sex)4 -1.75369 0.23432 -7.484 7.20e-14 ***
factor(birth)2 -0.46411 0.11952 -3.883 0.000103 ***
factor(birth)3 -0.72452 0.16201 -4.472 7.74e-06 ***
factor(birth)4 -1.87966 0.24910 -7.546 4.50e-14 ***
sex:birth 0.28584 0.02824 10.122 < 2e-16 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for poisson family taken to be 1)
Null deviance: 431.078 on 15 degrees of freedom
Residual deviance: 11.534 on 8 degrees of freedom
AIC: 118.21
Number of Fisher Scoring iterations: 4
Analysis of Deviance Table (Type II tests)
Response: count
LR Chisq Df Pr(>Chisq)
factor(sex) 201.042 3 < 2.2e-16 ***
factor(birth) 91.243 3 < 2.2e-16 ***
sex:birth 116.119 1 < 2.2e-16 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
# pp.218-219 Death Rates for Lung Cancer Patients
cancer <- read.table("http://www.stat.ufl.edu/~aa/cat/data/Cancer.dat", header = T)
cancer time histology stage count risktime
1 1 1 1 9 157
2 1 2 1 5 77
3 1 3 1 1 21
4 2 1 1 2 139
5 2 2 1 2 68
6 2 3 1 1 17
7 3 1 1 9 126
8 3 2 1 3 63
9 3 3 1 1 14
10 4 1 1 10 102
11 4 2 1 2 55
12 4 3 1 1 12
13 5 1 1 1 88
14 5 2 1 2 50
15 5 3 1 0 10
16 6 1 1 3 82
17 6 2 1 2 45
18 6 3 1 1 8
19 7 1 1 1 76
20 7 2 1 2 42
21 7 3 1 0 6
22 1 1 2 12 134
23 1 2 2 4 71
24 1 3 2 1 22
25 2 1 2 7 110
26 2 2 2 3 63
27 2 3 2 1 18
28 3 1 2 5 96
29 3 2 2 5 58
30 3 3 2 3 14
31 4 1 2 10 86
32 4 2 2 4 42
33 4 3 2 1 10
34 5 1 2 4 66
35 5 2 2 2 35
36 5 3 2 0 8
37 6 1 2 3 59
38 6 2 2 1 32
39 6 3 2 0 8
40 7 1 2 4 51
41 7 2 2 4 28
42 7 3 2 2 6
43 1 1 3 42 212
44 1 2 3 28 130
45 1 3 3 19 101
46 2 1 3 26 136
47 2 2 3 19 72
48 2 3 3 11 63
49 3 1 3 12 90
50 3 2 3 10 42
51 3 3 3 7 43
52 4 1 3 10 64
53 4 2 3 5 21
54 4 3 3 6 32
55 5 1 3 5 47
56 5 2 3 0 14
57 5 3 3 3 21
58 6 1 3 4 39
59 6 2 3 3 13
60 6 3 3 3 14
61 7 1 3 1 29
62 7 2 3 2 7
63 7 3 3 3 10
cancer$logrisktime <- log(cancer$risktime)
fit <- glm(count ~ factor(histology) + factor(stage) + factor(time), family = poisson,
offset = logrisktime, data = cancer)
summary(fit)
Call:
glm(formula = count ~ factor(histology) + factor(stage) + factor(time),
family = poisson, data = cancer, offset = logrisktime)
Deviance Residuals:
Min 1Q Median 3Q Max
-2.00333 -0.74769 -0.03194 0.46468 1.70832
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -3.00928 0.16651 -18.073 < 2e-16 ***
factor(histology)2 0.16244 0.12195 1.332 0.18285
factor(histology)3 0.10754 0.14745 0.729 0.46580
factor(stage)2 0.47001 0.17444 2.694 0.00705 **
factor(stage)3 1.32431 0.15205 8.709 < 2e-16 ***
factor(time)2 -0.12745 0.14908 -0.855 0.39259
factor(time)3 -0.07973 0.16352 -0.488 0.62585
factor(time)4 0.11892 0.17107 0.695 0.48694
factor(time)5 -0.66511 0.26061 -2.552 0.01071 *
factor(time)6 -0.35015 0.24348 -1.438 0.15040
factor(time)7 -0.17518 0.24985 -0.701 0.48321
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for poisson family taken to be 1)
Null deviance: 175.718 on 62 degrees of freedom
Residual deviance: 43.923 on 52 degrees of freedom
AIC: 251.74
Number of Fisher Scoring iterations: 5
Analysis of Deviance Table (Type II tests)
Response: count
LR Chisq Df Pr(>Chisq)
factor(histology) 1.876 2 0.39132
factor(stage) 99.155 2 < 2e-16 ***
factor(time) 11.383 6 0.07724 .
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
# pp. 220-221 Horseshoe Crabs Reprise
crabs <- read.table("http://www.stat.ufl.edu/~aa/cat/data/Crabs.dat", header = T)
head(crabs) crab sat y weight width color spine
1 1 8 1 3.05 28.3 2 3
2 2 0 0 1.55 22.5 3 3
3 3 9 1 2.30 26.0 1 1
4 4 0 0 2.10 24.8 3 3
5 5 4 1 2.60 26.0 3 3
6 6 0 0 2.10 23.8 2 3
crab sat y weight width color spine
168 168 2 1 2.175 26.2 3 3
169 169 3 1 2.750 26.1 3 3
170 170 4 1 3.275 29.0 3 3
171 171 0 0 2.625 28.0 1 1
172 172 0 0 2.625 27.0 4 3
173 173 0 0 2.000 24.5 2 2
Call:
glm(formula = sat ~ width, family = poisson, data = crabs)
Deviance Residuals:
Min 1Q Median 3Q Max
-2.8526 -1.9884 -0.4933 1.0970 4.9221
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -3.30476 0.54224 -6.095 1.1e-09 ***
width 0.16405 0.01997 8.216 < 2e-16 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for poisson family taken to be 1)
Null deviance: 632.79 on 172 degrees of freedom
Residual deviance: 567.88 on 171 degrees of freedom
AIC: 927.18
Number of Fisher Scoring iterations: 6
Call:
glm.nb(formula = sat ~ width, data = crabs, init.theta = 0.90456808,
link = log)
Deviance Residuals:
Min 1Q Median 3Q Max
-1.7798 -1.4110 -0.2502 0.4770 2.0177
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -4.05251 1.17143 -3.459 0.000541 ***
width 0.19207 0.04406 4.360 0.000013 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for Negative Binomial(0.9046) family taken to be 1)
Null deviance: 213.05 on 172 degrees of freedom
Residual deviance: 195.81 on 171 degrees of freedom
AIC: 757.29
Number of Fisher Scoring iterations: 1
Theta: 0.905
Std. Err.: 0.161
2 x log-likelihood: -751.291
# p.229 Environmental Opinions
Opinions <- read.table("http://www.stat.ufl.edu/~aa/cat/data/Envir_opinions.dat",
header = T)
head(Opinions) person y1 y2
1 1 1 1
2 2 1 1
3 3 1 1
4 4 1 1
5 5 1 1
6 6 1 1
person y1 y2
1139 1139 2 2
1140 1140 2 2
1141 1141 2 2
1142 1142 2 2
1143 1143 2 2
1144 1144 2 2
y2
y1 1 2
1 227 132
2 107 678
McNemar's Chi-squared test
data: tab
McNemar's chi-squared = 2.6151, df = 1, p-value = 0.1059
data:
95 percent confidence interval:
-0.004602847 0.048309140
sample estimates:
[1] 0.02185315
data:
95 percent confidence interval:
-0.004602847 0.048309140
sample estimates:
[1] 0.02185315
data:
95 percent confidence interval:
-0.004661338 0.048494581
n12 <- tab[1, 2]
n21 <- tab[2, 1]
n <- sum(tab)
diff <- (n12 - n21)/n
SE <- sqrt(n12 + n21 - (n12 - n21)/n)/n
diff + c(-1, 1) * qnorm(0.975) * SE[1] -0.004631925 0.048338219
# Fitting GEE model
Opinions2 <- read.table("http://www.stat.ufl.edu/~aa/cat/data/Opinions.dat",
header = T)
head(Opinions2) person question y
1 1 1 1
2 1 0 1
3 2 1 1
4 2 0 1
5 3 1 1
6 3 0 1
person question y
2283 1142 1 0
2284 1142 0 0
2285 1143 1 0
2286 1143 0 0
2287 1144 1 0
2288 1144 0 0
# install.packages('gee')
library(gee)
fit2 <- gee(y ~ question, id = person, family = binomial, data = Opinions2)(Intercept) question
-0.8858933 0.1035319
GEE: GENERALIZED LINEAR MODELS FOR DEPENDENT DATA
gee S-function, version 4.13 modified 98/01/27 (1998)
Model:
Link: Logit
Variance to Mean Relation: Binomial
Correlation Structure: Independent
Call:
gee(formula = y ~ question, id = person, data = Opinions2, family = binomial)
Summary of Residuals:
Min 1Q Median 3Q Max
-0.3138112 -0.3138112 -0.2919580 0.6861888 0.7080420
Coefficients:
Estimate Naive S.E. Naive z Robust S.E. Robust z
(Intercept) -0.8858933 0.06505597 -13.617401 0.06502753 -13.623357
question 0.1035319 0.09107816 1.136737 0.06397794 1.618244
Estimated Scale Parameter: 1.000875
Number of Iterations: 1
Working Correlation
[,1] [,2]
[1,] 1 0
[2,] 0 1
question
1.109081
# Fitting the Logistic-Normal Model of Chapter 10 (pp.274-277)
# install.packages('lme4')
library(lme4)
fit <- glmer(y ~ (1 | person) + question, family = binomial, nAGQ = 50, data = Opinions2)
summary(fit)Generalized linear mixed model fit by maximum likelihood (Adaptive
Gauss-Hermite Quadrature, nAGQ = 50) [glmerMod]
Family: binomial ( logit )
Formula: y ~ (1 | person) + question
Data: Opinions2
AIC BIC logLik deviance df.resid
2526.8 2544.0 -1260.4 2520.8 2285
Scaled residuals:
Min 1Q Median 3Q Max
-0.8872 -0.2691 -0.2423 0.4646 1.2519
Random effects:
Groups Name Variance Std.Dev.
person (Intercept) 8.143 2.854
Number of obs: 2288, groups: person, 1144
Fixed effects:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -1.8343 0.1624 -11.295 <2e-16 ***
question 0.2100 0.1301 1.614 0.106
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Correlation of Fixed Effects:
(Intr)
question -0.452
[1] 1.233647
[1] 1.233645
# Section 8.3 Comparing Proportions for Nominal Matched-Pairs Responses
# Coffee Brand Market Share example
drinkCoffee <- read.table("http://www.stat.ufl.edu/~aa/cat/data/Coffee.dat",
header = T)
head(drinkCoffee) person purchase y
1 1 1 1
2 1 0 1
3 2 1 1
4 2 0 1
5 3 1 1
6 3 0 1
person purchase y
1077 539 1 5
1078 539 0 5
1079 540 1 5
1080 540 0 5
1081 541 1 5
1082 541 0 5
# install.packages('multgee')
library(multgee)
fit <- nomLORgee(y ~ purchase, id = person, LORstr = "independence", data = drinkCoffee)
summary(fit)GEE FOR NOMINAL MULTINOMIAL RESPONSES
version 1.6.0 modified 2017-07-10
Link : Baseline Category Logit
Local Odds Ratios:
Structure: independence
call:
nomLORgee(formula = y ~ purchase, data = drinkCoffee, id = person,
LORstr = "independence")
Summary of residuals:
Min. 1st Qu. Median Mean 3rd Qu. Max.
-0.4270 -0.2495 -0.1386 0.0000 -0.0610 0.9390
Number of Iterations: 1
Coefficients:
Estimate san.se san.z Pr(>|san.z|)
beta10 0.81093 0.15516 5.2265 < 2e-16 ***
purchase:1 0.32340 0.16830 1.9215 0.05466 .
beta20 0.31237 0.16989 1.8387 0.06596 .
purchase:2 -0.00222 0.18662 -0.0119 0.99051
beta30 1.34807 0.14490 9.3035 < 2e-16 ***
purchase:3 -0.03729 0.15807 -0.2359 0.81353
beta40 -0.59784 0.21672 -2.7585 0.00581 **
purchase:4 0.17402 0.23531 0.7396 0.45957
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Local Odds Ratios Estimates:
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8]
[1,] 0 0 0 0 1 1 1 1
[2,] 0 0 0 0 1 1 1 1
[3,] 0 0 0 0 1 1 1 1
[4,] 0 0 0 0 1 1 1 1
[5,] 1 1 1 1 0 0 0 0
[6,] 1 1 1 1 0 0 0 0
[7,] 1 1 1 1 0 0 0 0
[8,] 1 1 1 1 0 0 0 0
pvalue of Null model: <0.0001
fit0 <- nomLORgee(y ~ 1, id = person, LORstr = "independence", data = drinkCoffee)
# doesn't work: lrtest(fit0, fit)
waldts(fit0, fit)Goodness of Fit based on the Wald test
Model under H_0: y ~ 1
Model under H_1: y ~ purchase
Wald Statistic=12.4869, df=4, p-value=0.0141
Cochran-Mantel-Haenszel test
data: purchase and y and person
Cochran-Mantel-Haenszel M^2 = 12.291, df = 4, p-value = 0.01531
# Fitting Quasi-Symmetry (QS) Model p.239
drinkMoreCoffee <- read.table("http://www.stat.ufl.edu/~aa/cat/data/Coffee2.dat",
header = T)
drinkMoreCoffee H T S N B nij nji
1 1 -1 0 0 0 17 9
2 1 0 -1 0 0 44 17
3 1 0 0 -1 0 7 6
4 1 0 0 0 -1 10 10
5 0 1 -1 0 0 11 11
6 0 1 0 -1 0 0 4
7 0 1 0 0 -1 9 4
8 0 0 1 -1 0 9 9
9 0 0 1 0 -1 12 12
10 0 0 0 1 -1 2 2
symmMod <- glm(nij/(nij + nji) ~ -1, family = binomial, weights = nij + nji,
data = drinkMoreCoffee)
summary(symmMod)
Call:
glm(formula = nij/(nij + nji) ~ -1, family = binomial, data = drinkMoreCoffee,
weights = nij + nji)
Deviance Residuals:
Min 1Q Median 3Q Max
-2.355 0.000 0.000 1.123 3.518
No Coefficients
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 22.473 on 10 degrees of freedom
Residual deviance: 22.473 on 10 degrees of freedom
AIC: 52.433
Number of Fisher Scoring iterations: 0
QSMod <- glm(nij/(nij + nji) ~ -1 + H + T + S + N + B, family = binomial, weights = nij +
nji, data = drinkMoreCoffee)
summary(QSMod)
Call:
glm(formula = nij/(nij + nji) ~ -1 + H + T + S + N + B, family = binomial,
data = drinkMoreCoffee, weights = nij + nji)
Deviance Residuals:
Min 1Q Median 3Q Max
-2.1010 -0.2902 -0.0804 0.7165 1.4120
Coefficients: (1 not defined because of singularities)
Estimate Std. Error z value Pr(>|z|)
H 0.595440 0.293658 2.028 0.0426 *
T -0.004004 0.329359 -0.012 0.9903
S -0.113299 0.285082 -0.397 0.6911
N 0.302115 0.401589 0.752 0.4519
B NA NA NA NA
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 22.473 on 10 degrees of freedom
Residual deviance: 9.974 on 6 degrees of freedom
AIC: 47.934
Number of Fisher Scoring iterations: 4
# Recycle or Drive Less to Help the Environment? pp.240-242
motherEarth <- read.table("http://www.stat.ufl.edu/~aa/cat/data/Envir.dat",
header = T)
head(motherEarth) person question y
1 1 1 1
2 1 0 1
3 2 1 1
4 2 0 1
5 3 1 1
6 3 0 1
person question y
2455 1228 1 4
2456 1228 0 4
2457 1229 1 4
2458 1229 0 4
2459 1230 1 4
2460 1230 0 4
library(multgee)
fit <- ordLORgee(y ~ question, id = person, LORstr = "independence", data = motherEarth)
summary(fit)GEE FOR ORDINAL MULTINOMIAL RESPONSES
version 1.6.0 modified 2017-07-10
Link : Cumulative logit
Local Odds Ratios:
Structure: independence
call:
ordLORgee(formula = y ~ question, data = motherEarth, id = person,
LORstr = "independence")
Summary of residuals:
Min. 1st Qu. Median Mean 3rd Qu. Max.
-0.354916 -0.264742 -0.059210 -0.002021 -0.033859 0.966141
Number of Iterations: 1
Coefficients:
Estimate san.se san.z Pr(>|san.z|)
beta10 -3.35111 0.08289 -40.4287 < 2.2e-16 ***
beta20 -2.27673 0.07430 -30.6424 < 2.2e-16 ***
beta30 -0.58488 0.05882 -9.9443 < 2.2e-16 ***
question 2.75361 0.08147 33.7985 < 2.2e-16 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Local Odds Ratios Estimates:
[,1] [,2] [,3] [,4] [,5] [,6]
[1,] 0 0 0 1 1 1
[2,] 0 0 0 1 1 1
[3,] 0 0 0 1 1 1
[4,] 1 1 1 0 0 0
[5,] 1 1 1 0 0 0
[6,] 1 1 1 0 0 0
pvalue of Null model: <0.0001
motherEarth2 <- read.table("http://www.stat.ufl.edu/~aa/cat/data/Environment.dat",
header = T)
motherEarth2 always often sometimes never x nij nji
1 1 -1 0 0 1 43 4
2 1 0 -1 0 2 163 4
3 1 0 0 -1 3 233 0
4 0 1 -1 0 1 99 8
5 0 1 0 -1 2 185 1
6 0 0 1 -1 1 230 18
fit2 <- glm(nij/(nij + nji) ~ -1 + x, family = binomial, weights = nij + nji,
data = motherEarth2)
summary(fit2)
Call:
glm(formula = nij/(nij + nji) ~ -1 + x, family = binomial, data = motherEarth2,
weights = nij + nji)
Deviance Residuals:
1 2 3 4 5 6
-0.03567 -1.82023 0.59541 0.33794 0.46512 0.64368
Coefficients:
Estimate Std. Error z value Pr(>|z|)
x 2.3936 0.1508 15.88 <2e-16 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 1106.1240 on 6 degrees of freedom
Residual deviance: 4.4139 on 5 degrees of freedom
AIC: 23.35
Number of Fisher Scoring iterations: 4
fit.QS <- glm(nij/(nij + nji) ~ -1 + always + often + sometimes + never, family = binomial,
weights = nij + nji, data = motherEarth2)
summary(fit.QS)
Call:
glm(formula = nij/(nij + nji) ~ -1 + always + often + sometimes +
never, family = binomial, data = motherEarth2, weights = nij +
nji)
Deviance Residuals:
1 2 3 4 5 6
0.7689 -1.1439 0.6760 0.4572 0.3006 -0.1381
Coefficients: (1 not defined because of singularities)
Estimate Std. Error z value Pr(>|z|)
always 6.9269 0.4708 14.71 <2e-16 ***
often 4.9332 0.3617 13.64 <2e-16 ***
sometimes 2.5817 0.2386 10.82 <2e-16 ***
never NA NA NA NA
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 1106.1240 on 6 degrees of freedom
Residual deviance: 2.6751 on 3 degrees of freedom
AIC: 25.611
Number of Fisher Scoring iterations: 4
# Agreement of Pathologists on p.244
patho <- read.table("http://www.stat.ufl.edu/~aa/cat/data/Pathologists.dat",
header = T)
patho X Y count diag
1 1 1 22 1
2 1 2 2 0
3 1 3 2 0
4 1 4 0 0
5 2 1 5 0
6 2 2 7 2
7 2 3 14 0
8 2 4 0 0
9 3 1 0 0
10 3 2 2 0
11 3 3 36 3
12 3 4 0 0
13 4 1 0 0
14 4 2 1 0
15 4 3 17 0
16 4 4 10 4
# Fit independence model
fitI <- glm(count ~ factor(X) + factor(Y), family = poisson, data = patho)
summary(fitI)
Call:
glm(formula = count ~ factor(X) + factor(Y), family = poisson,
data = patho)
Deviance Residuals:
Min 1Q Median 3Q Max
-4.2771 -2.2089 -0.7300 0.6699 5.0439
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 1.783e+00 2.589e-01 6.888 5.66e-12 ***
factor(X)2 -3.218e-12 2.773e-01 0.000 1.00000
factor(X)3 3.795e-01 2.545e-01 1.491 0.13595
factor(X)4 7.411e-02 2.724e-01 0.272 0.78554
factor(Y)2 -8.109e-01 3.469e-01 -2.337 0.01942 *
factor(Y)3 9.383e-01 2.270e-01 4.133 3.58e-05 ***
factor(Y)4 -9.933e-01 3.702e-01 -2.683 0.00729 **
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for poisson family taken to be 1)
Null deviance: 190.40 on 15 degrees of freedom
Residual deviance: 117.96 on 9 degrees of freedom
AIC: 172.78
Number of Fisher Scoring iterations: 6
# Fit Quasi-independence model
fitQI <- glm(count ~ factor(X) + factor(Y) + factor(diag), family = poisson,
data = patho)
summary(fitQI)
Call:
glm(formula = count ~ factor(X) + factor(Y) + factor(diag), family = poisson,
data = patho)
Deviance Residuals:
1 2 3 4 5 6 7
0.00000 1.19586 -0.74802 -0.00006 1.48661 0.00000 -0.66364
8 9 10 11 12 13 14
-0.00014 -1.23667 0.63080 0.00000 -0.00008 -1.93254 -1.35095
15 16
1.02517 0.00000
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -0.7700 0.6979 -1.103 0.26986
factor(X)2 1.6321 0.5604 2.912 0.00359 **
factor(X)3 0.5017 0.9261 0.542 0.58801
factor(X)4 1.3946 0.5551 2.512 0.01199 *
factor(Y)2 0.4796 0.6552 0.732 0.46414
factor(Y)3 1.9493 0.4971 3.921 0.000088004 ***
factor(Y)4 -19.3097 4988.8789 -0.004 0.99691
factor(diag)1 3.8611 0.7297 5.291 0.000000122 ***
factor(diag)2 0.6042 0.6900 0.876 0.38119
factor(diag)3 1.9025 0.8367 2.274 0.02298 *
factor(diag)4 20.9877 4988.8789 0.004 0.99664
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for poisson family taken to be 1)
Null deviance: 190.398 on 15 degrees of freedom
Residual deviance: 13.178 on 5 degrees of freedom
AIC: 75.997
Number of Fisher Scoring iterations: 17
# Tennis on p.248
tennis <- read.table("http://www.stat.ufl.edu/~aa/cat/data/Tennis.dat", header = T)
tennis Djokovic Federer Murray Nadal Wawrinka nij nji
1 1 -1 0 0 0 9 6
2 1 0 -1 0 0 14 3
3 1 0 0 -1 0 9 2
4 1 0 0 0 -1 4 3
5 0 1 -1 0 0 5 0
6 0 1 0 -1 0 5 1
7 0 1 0 0 -1 7 2
8 0 0 1 -1 0 2 4
9 0 0 1 0 -1 2 2
10 0 0 0 1 -1 4 3
fitTennis <- glm(nij/(nij + nji) ~ -1 + Djokovic + Federer + Murray + Nadal +
Wawrinka, family = binomial, weights = nij + nji, data = tennis)
summary(fitTennis)
Call:
glm(formula = nij/(nij + nji) ~ -1 + Djokovic + Federer + Murray +
Nadal + Wawrinka, family = binomial, data = tennis, weights = nij +
nji)
Deviance Residuals:
Min 1Q Median 3Q Max
-1.1225 -0.1262 0.3715 0.5386 1.2928
Coefficients: (1 not defined because of singularities)
Estimate Std. Error z value Pr(>|z|)
Djokovic 1.17612 0.49952 2.354 0.0185 *
Federer 1.13578 0.51095 2.223 0.0262 *
Murray -0.56852 0.56833 -1.000 0.3172
Nadal -0.06185 0.51487 -0.120 0.9044
Wawrinka NA NA NA NA
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 26.8960 on 10 degrees of freedom
Residual deviance: 4.3958 on 6 degrees of freedom
AIC: 34.041
Number of Fisher Scoring iterations: 4