Applied Statistics Week 4 Exercise 3 Tick bites and suspicion of Borrelia Mihaela Frincu 20.12.2011.

Slides:



Advertisements
Similar presentations
Lecture 11 (Chapter 9).
Advertisements

© Department of Statistics 2012 STATS 330 Lecture 32: Slide 1 Stats 330: Lecture 32.
Uncertainty and confidence intervals Statistical estimation methods, Finse Friday , 12.45–14.05 Andreas Lindén.
Logistic Regression Example: Horseshoe Crab Data
Logistic Regression.
Predicting Success in the National Football League An in-depth look at the factors that differentiate the winning teams from the losing teams. Benjamin.
Logistic Regression Multivariate Analysis. What is a log and an exponent? Log is the power to which a base of 10 must be raised to produce a given number.
Logistic Regression Predicting Dichotomous Data. Predicting a Dichotomy Response variable has only two states: male/female, present/absent, yes/no, etc.
Nemours Biomedical Research Statistics April 23, 2009 Tim Bunnell, Ph.D. & Jobayer Hossain, Ph.D. Nemours Bioinformatics Core Facility.
Gl
Introduction to Logistic Regression Analysis Dr Tuan V. Nguyen Garvan Institute of Medical Research Sydney, Australia.
Genetic Association and Generalised Linear Models Gil McVean, WTCHG Weds 2 nd November 2011.
1 Logistic Regression Homework Solutions EPP 245/298 Statistical Analysis of Laboratory Data.
Logistic Regression with “Grouped” Data Lobster Survival by Size in a Tethering Experiment Source: E.B. Wilkinson, J.H. Grabowski, G.D. Sherwood, P.O.
MATH 3359 Introduction to Mathematical Modeling Download/Import/Modify Data, Logistic Regression.
Logistic Regression and Generalized Linear Models:
SPH 247 Statistical Analysis of Laboratory Data May 19, 2015SPH 247 Statistical Analysis of Laboratory Data1.
© Department of Statistics 2012 STATS 330 Lecture 28: Slide 1 Stats 330: Lecture 28.
New Ways of Looking at Binary Data Fitting in R Yoon G Kim, Colloquium Talk.
Lecture 15: Logistic Regression: Inference and link functions BMTRY 701 Biostatistical Methods II.
Lecture 6 Generalized Linear Models Olivier MISSA, Advanced Research Skills.
© Department of Statistics 2012 STATS 330 Lecture 26: Slide 1 Stats 330: Lecture 26.
© Department of Statistics 2012 STATS 330 Lecture 25: Slide 1 Stats 330: Lecture 25.
Logistic Regression Pre-Challenger Relation Between Temperature and Field-Joint O-Ring Failure Dalal, Fowlkes, and Hoadley (1989). “Risk Analysis of the.
Design and Analysis of Clinical Study 11. Analysis of Cohort Study Dr. Tuan V. Nguyen Garvan Institute of Medical Research Sydney, Australia.
Repeated Measures  The term repeated measures refers to data sets with multiple measurements of a response variable on the same experimental unit or subject.
April 6 Logistic Regression –Estimating probability based on logistic model –Testing differences among multiple groups –Assumptions for model.
Logistic regression. Analysis of proportion data We know how many times an event occurred, and how many times did not occur. We want to know if these.
November 5, 2008 Logistic and Poisson Regression: Modeling Binary and Count Data LISA Short Course Series Mark Seiss, Dept. of Statistics.
Multiple Regression and Model Building Chapter 15 Copyright © 2014 by The McGraw-Hill Companies, Inc. All rights reserved.McGraw-Hill/Irwin.
1 היחידה לייעוץ סטטיסטי אוניברסיטת חיפה פרופ’ בנימין רייזר פרופ’ דוד פרג’י גב’ אפרת ישכיל.
April 4 Logistic Regression –Lee Chapter 9 –Cody and Smith 9:F.
Using R for Marketing Research Dan Toomey 2/23/2015
© Department of Statistics 2012 STATS 330 Lecture 31: Slide 1 Stats 330: Lecture 31.
© Department of Statistics 2012 STATS 330 Lecture 20: Slide 1 Stats 330: Lecture 20.
STA 286 week 131 Inference for the Regression Coefficient Recall, b 0 and b 1 are the estimates of the slope β 1 and intercept β 0 of population regression.
Design and Analysis of Clinical Study 10. Cohort Study Dr. Tuan V. Nguyen Garvan Institute of Medical Research Sydney, Australia.
Tutorial 4 MBP 1010 Kevin Brown. Correlation Review Pearson’s correlation coefficient – Varies between – 1 (perfect negative linear correlation) and 1.
Environmental Modeling Basic Testing Methods - Statistics III.
A preliminary exploration into the Binomial Logistic Regression Models in R and their potential application Andrew Trant PPS Arctic - Labrador Highlands.
Count Data. HT Cleopatra VII & Marcus Antony C c Aa.
© Department of Statistics 2012 STATS 330 Lecture 22: Slide 1 Stats 330: Lecture 22.
Université d’Ottawa - Bio Biostatistiques appliquées © Antoine Morin et Scott Findlay :32 1 Logistic regression.
Logistic Regression. Example: Survival of Titanic passengers  We want to know if the probability of survival is higher among children  Outcome (y) =
© Department of Statistics 2012 STATS 330 Lecture 24: Slide 1 Stats 330: Lecture 24.
Using Microsoft Excel to Conduct Regression Analysis.
04/19/2006Econ 6161 Econ 616 – Spring 2006 Qualitative Response Regression Models Presented by Yan Hu.
Tutorial 5 Thursday February 14 MBP 1010 Kevin Brown.
Logistic Regression and Odds Ratios Psych DeShon.
Logistic Regression. What is the purpose of Regression?
R Programming/ Binomial Models Shinichiro Suna. Binomial Models In binomial model, we have one outcome which is binary and a set of explanatory variables.
Logistic Regression Jeff Witmer 30 March Categorical Response Variables Examples: Whether or not a person smokes Success of a medical treatment.
Unit 32: The Generalized Linear Model
Transforming the data Modified from:
Logistic regression.
A priori violations In the following cases, your data violates the normality and homoskedasticity assumption on a priori grounds: (1) count data  Poisson.
Résolution de l’ex 1 p40 t=c(2:12);N=c(55,90,135,245,403,665,1100,1810,3000,4450,7350) T=data.frame(t,N,y=log(N));T; > T t N y
CHAPTER 7 Linear Correlation & Regression Methods
Logistic Regression Logistic Regression is used to study or model the association between a binary response variable (y) and a set of explanatory variables.
Math 4030 – 10b Inferences Concerning Variances: Hypothesis Testing
Correlation and regression
Measuring Success in Prediction
Console Editeur : myProg.R 1
PSY 626: Bayesian Statistics for Psychological Science
SAME THING?.
PSY 626: Bayesian Statistics for Psychological Science
Tutorial 4 For the Seat Belt Data, the Death Penalty Data, and the University Admission Data, (1). Identify the response variable and the explanatory.
Section 5 Multiple Regression.
Logistic Regression with “Grouped” Data
Presentation transcript:

Applied Statistics Week 4 Exercise 3 Tick bites and suspicion of Borrelia Mihaela Frincu

Presentation of data set gender IgG F M neg pos IgG – presence of Borrelia infection neg/pos Gender – M=male, F=female Age [years]

1. Perform a logistic regression with IgG as response and gender as explanatory variable fitlog<-glm(IgG~gender, family=binomial,data=borrelia) summary(fitlog) Deviance Residuals: Min 1Q Median 3Q Max Coefficients: Estimate Std. Error z value Pr(>|z|) (Intercept) <2e-16 *** genderM Signif. codes: 0 ‘***’ ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 (Dispersion parameter for binomial family taken to be 1) Null deviance: on 3018 degrees of freedom Residual deviance: on 3017 degrees of freedom AIC: Number of Fisher Scoring iterations: 6

2. Assess the effect of gender by a likelihood ratio test First model: infection depends on gender fitlog<-glm(IgG~gender, family=binomial,data=borrelia) Second model: infection is independent of gender: fitno<-glm(IgG~1, family=binomial,data=borrelia) Comparison of the two models: anova(fitlog,fitno,test="Chisq") Analysis of Deviance Table Model 1: IgG ~ gender Model 2: IgG ~ 1 Resid. Df Resid. Dev Df Deviance Pr(>Chi) P= there is no significant difference between the two models -> infection does not depend on gender

3. Calculate the relative change in odds of a positive IgG test (odds ratio) due to gender > summary(fitlog) Coefficients: Estimate Std. Error z value Pr(>|z|) (Intercept) <2e-16 *** genderM Signif. codes: 0 ‘***’ ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Relative change in odds ratio due to gender is: exp(0.1510)=

4. Provide the odds ratio with a 95% CI library(multcomp) gencomp<-glht(fitlog,IgG=mcp(gender)) exp(confint(gencomp,calpha=1.96)$confint) Estimate lwr upr (Intercept) genderM

5. What value of the odds ratio corresponds to no association between gender and IgG If infection does not depend on gender we expect the odds ratio to be 1 (equal odds). 6. Do we get the same conclusion from the 2 test, the likelihood ratio test, and the 95% CI for the odds ratio We got the same answer. 2 test: P=0.444 there is no significant difference between the two models -> infection does not depend on gender Likelihood ratio test: for the effect of gender p= > no significant gender effect 95% CI: genderM > 1 is in the confidence interval

Reporting the results The influence of gender on the incidence of Borrelia infections was investigated by a logistic regression with IgG as response and gender as explanatory variable. The influence of the gender on the incidence of infections was not found to be significant (p=0.444). The dataset was also ivestigated using a likelihood ratio test. The result was similar (p=0.4449), which indicates that gender does not have a significant influence on the incidence of borrelia infection. The odds ratio of infection male:female for the data set was found to be (95% CI) = 1.16 ( ) The analysis was performed in R version (