Homework 6.docx - 1 a b c The correlation between the...

This preview shows page 1 - 5 out of 5 pages.

1. a) b)
c)
The correlation between the estimated regression parameters is less negative, changing from -0.802 to -0.397. Because a Markov chain simulation is more efficient when the magnitude of the correlation between simulated variables decreases, the second coding of the x variable is more efficient. The relationship between the logRR and beta for the new coding is 2 times beta, which means that the standard error and mean estimate is half of the initial code. 2. a) > y <- c(2,19,24,49,69,78) > n <- rep(80,6) > x <- c(-0.552,-0.113,0.059,0.185,0.446,0.753) > slogit <- log((y+0.5)/(n-y+0.5)) > plot(x,slogit) > ymat <- cbind(y,n-y) > m1 <- glm(ymat ~ x, family=binomial) > summary(m1) Call: glm(formula = ymat ~ x, family = binomial) Deviance Residuals: 1 2 3 4 5 6 0.3223 0.8832 -1.7790 0.7207 0.1758 0.1940 Coefficients: Estimate Std. Error z value Pr(>|z|) (Intercept) -0.7600 0.1426 -5.328 9.91e-08 *** x 5.6941 0.5366 10.611 < 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: 271.6730 on 5 degrees of freedom Residual deviance: 4.6367 on 4 degrees of freedom AIC: 31.893 Number of Fisher Scoring iterations: 4

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture