{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# Note 3 - Stats for Clinical Trials Math 150 Jo Hardin...

This preview shows pages 1–2. Sign up to view the full content.

Stats for Clinical Trials, Math 150 Jo Hardin Logistic Regression example # 1 1. Consider the HERS data described in your book (age 30); variable description also given on the book website http://www.epibiostat.ucsf.edu/biostat/vgsm/data/hersdata. codebook.txt For now, we will try to predict whether the individuals had a medical condition, medcond . We will use the variables age , weight , diabetes and drinkany > HERS <- read.table("HERS.txt", sep="\t", header=T, na.strings=".") > attach(HERS) > summary(glm(medcond ~ age, family="binomial"))\$coef Estimate Std. Error z value Pr(>|z|) (Intercept) -1.60404454 0.400644718 -4.003658 6.237044e-05 age 0.01619155 0.005965348 2.714267 6.642259e-03 > summary(glm(medcond ~ age + weight, family="binomial"))\$coef Estimate Std. Error z value Pr(>|z|) (Intercept) -2.169846602 0.496466231 -4.370582 1.239155e-05 age 0.018926204 0.006132171 3.086379 2.026105e-03 weight 0.005279148 0.002742218 1.925138 5.421212e-02 > summary(glm(medcond ~ age+diabetes, family="binomial"))\$coef Estimate Std. Error z value Pr(>|z|) (Intercept) -1.89085342 0.407555871 -4.639495 3.492616e-06 age 0.01848156 0.006027953 3.065977 2.169602e-03 diabetes 0.48714064 0.088177630 5.524538 3.303543e-08 > summary(glm(medcond ~ age*diabetes, family="binomial"))\$coef Estimate Std. Error z value Pr(>|z|) (Intercept) -2.51762428 0.478275141 -5.263966 1.409802e-07 age 0.02780399 0.007072117 3.931495 8.441917e-05 diabetes 2.83494074 0.913870625 3.102125 1.921369e-03 age:diabetes -0.03540210 0.013718549 -2.580601 9.862861e-03

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern