Solution to Series 3
|
|
- Georgiana Anna Webster
- 5 years ago
- Views:
Transcription
1 Dr. A. Hauser Survival Analysis AS 2018 Solution to Series 3 1. a) > library(mass) > library(survival) > t.url <- ' > d.diabetes <- read.table(t.url, header = TRUE, sep = ",") > r.weib <- survreg(surv(, tod) ~ sex + diab +, data = d.diabetes, dist = "weibull") > summary(r.weib) survreg(formula = Surv(, tod) ~ sex + diab +, data = d.diabetes, dist = "weibull") (Intercept) <2e-16 sex diab Log(scale) Scale= 1.13 Weibull distribution Loglik(model)= Loglik(intercept only)= Chisq= on 3 degrees of freedom, p= Number of Newton-Raphson Iterations: 6 Only age is significant (p-value smaller than 0.05). b) Variable selection using stepaic: > d.diabetes$x4 <- d.diabetes$x5 <- d.diabetes$ > d.diabetes$x4[d.diabetes$diab == 0] <- 0 > d.diabetes$x5[d.diabetes$diab == 1] <- 0 > r.weib2 <- survreg(surv(, tod) ~ sex + diab + x4 + x5, data = d.diabetes) > r.weib3 <- stepaic(r.weib2, direction = "both", scope = ~.^2) > r.weib3$anova Stepwise Model Path Analysis of Deviance Table Initial Model: Surv(, tod) ~ sex + diab + x4 + x5 Final Model: Surv(, tod) ~ diab + x5 Step Df Deviance Resid. Df Resid. Dev AIC sex x > summary(r.weib3)
2 2 survreg(formula = Surv(, tod) ~ diab + x5, data = d.diabetes) (Intercept) e-10 diab x Log(scale) Scale= 1.12 Weibull distribution Loglik(model)= Loglik(intercept only)= Chisq= on 2 degrees of freedom, p= Number of Newton-Raphson Iterations: 5 The result is interpreted as follows: For non-diabetics only age has an influence on survival-probabilities. Being diabetics has an influence on survival that is much more important than the influence of age. This results is in line with clinical experience, that diabetics have a higher risk of dying. c) > library(car) > lin.pred <- predict(r.weib3, type = "lp")[d.diabetes$tod == 1] > log.resid <- log(d.diabetes$[d.diabetes$tod == 1]) - lin.pred > qqplot(exp(log.resid), dist = "weibull", shape = 1 / r.weib3$scale, main = "QQ-plot") [1] 4 13 QQ plot 4 exp(log.resid) weibull quantiles The QQ-Plot looks good. d) The estimated hazard function for the weibull regression is (see slides): h(t; x 1,..., x p ) = α t α 1 exp( α ( β }{{} 0 +β 1 x β p x p )) log(λ 0) Thus the estimated hazard function for a non-diabetic (same for male and female, the variable sex does not appear in the best model) is: ĥ(t; diab = 0, x5) = α t α 1 exp( α x T β) with x T = (1, 0, x5) and β T = ( β 0, β 2, β 5 ). The estimation for α = 1 σ is according to the R-ouptut: Thus α = = ĥ(t; diab = 0, x5) = t exp( ( x5 ( ))) Doing the calculation in R: > (t.sigma <- r.weib3$scale) [1]
3 3 > (t.alpha <- 1 / t.sigma) [1] > (t.beta <- r.weib3$coef) (Intercept) diab x e) We are interested in S (3650 (= 10 years); man, nondiabetic, 50 years old). It holds that (see slides): S(t; x 1,..., x p ) = exp[ exp[α (log(t) β }{{} 0 β 1 x 1... β p x p )]] log(λ 0) Thus Ŝ(t; diab = 0; x5 = 50) = exp ( exp(0.893 (log(t) ( )))) The probability that our patient will still be alive in 10 years (3650 days) is Ŝ(3650) = Calculation in R: > t.alpha <- 1 / r.weib3$scale > t.beta <- unname(r.weib3$coef) > t.beta [1] > exp(-exp(t.alpha * (log(3650) - t.beta[1] - t.beta[3] * 50))) [1] f) The survival time after an operation is dramatically shorter for diabetics: > r.pre <- predict(r.weib3, p = 0.5, type = "uquantile", se.fit = TRUE, newdata = data.frame(diab = 0, x5 = 50)) > (exp(r.pre$fit + c(-1.96, 0, 1.96) * r.pre$se.fit) / 365) [1] Approximately 11 years after the operation half of the non-diabetics is dead. However, the confidence interval is quite large (13 years). > r.pre <- predict(r.weib3, p = 0.5, type = "uquantile", se.fit = TRUE, newdata = data.frame(diab = 1, x5 = 0)) > (exp(r.pre$fit + c(-1.96, 0, 1.96) * r.pre$se.fit) / 365) [1] Half of the diabetics is dead approximately 2 years after the operation. 2. a) > library(survival) > t.url <- " > d.diabetes <- read.table(t.url, header = TRUE, sep = ",") > d.nondiab <- d.diabetes[d.diabetes$diab == 0, ] > d.diab <- d.diabetes[d.diabetes$diab == 1, ] > par(mfrow = c(1, 2)) > plot( ~, data = d.nondiab, col = 2 - d.nondiab$tod, pch = ifelse(d.nondiab$tod == 1, 1, 16), main = "Nondiabetes") > lines(smooth.spline(d.nondiab$, d.nondiab$)) > plot( ~, data = d.diab, pch = ifelse(d.diab$tod == 1, 2, 17), col = 2 - d.diab$tod, main = "diabetes") > lines(smooth.spline(d.diab$, d.diab$))
4 4 Nondiabetes diabetes We can see, that for non-diabetics the survival times decrease linearly, whereas for the diabetics it is rather a quadratic curve. The survival time for diabetics is very low compared to the non-diabetics, that means for younger people the illness is an important factor to survival. Furthermore we can suppose, that after a certain age, survival times do not depend much on being a diabetic or not - that means after a certain age, age is the more important factor to survival. We can see this very well in a common plot: > plot( ~, data = d.nondiab, col = 2 - d.nondiab$tod, pch = ifelse(d.nondiab$tod == 1, 1, 16)) > lines(smooth.spline(d.nondiab$, d.nondiab$)) > points( ~, data = d.diab, pch = ifelse(d.diab$tod == 1, 2, 17), col = 2 - d.diab$tod) > lines(smooth.spline(d.diab$, d.diab$)) b) The dataset is prepared as in the previous exercise: > d.diabetes$x4 <- d.diabetes$x5 <- d.diabetes$ > d.diabetes$x4[d.diabetes$diab == 0] <- 0 > d.diabetes$x5[d.diabetes$diab == 1] <- 0 We estimate the loglogistic model with survreg. > r.logl <- survreg(surv(, tod) ~ diab + x5, data = d.diabetes, dist = "loglogistic") > summary(r.logl) survreg(formula = Surv(, tod) ~ diab + x5, data = d.diabetes, dist = "loglogistic") (Intercept) e-09 diab x Log(scale) Scale= Log logistic distribution Loglik(model)= Loglik(intercept only)= Chisq= on 2 degrees of freedom, p=
5 5 Number of Newton-Raphson Iterations: 4 According to the slides the following holds: Calculation in R: S(t X 1,..., X p ) = > alpha <- 1 / r.logl$scale > beta <- unname(r.logl$coef) > beta [1] exp [α(log(t) β 0 β 1 X 1... β p X p )] > (s.hat <- 1 / (1 + exp(alpha * (log(6 * 365) - beta[1] - beta[2] * 1)))) [1] The probability of being alive 6 years after the operation is only 0.22 for diabetics. The odds can be calculated easily by > s.hat / (1 - s.hat) [1] We can also derive them generally: odds = S(t X 1,..., X p ) 1 S(t X 1,..., X p ) = 1 exp [α(log(t) β 0 β 1 X 1... β p X p )] = exp [ α(log(t) β 0 β 1 X 1... β p X p )] > exp(-alpha * (log(6 * 365) - beta[1] - beta[2] * 1)) [1] c) Let x 1 = [diab = 1, x5 = 0] be the 50-year-old diabetic and x 2 = [diab = 0, x5 = 50] the 50-year-old non-diabetic. We have: OR(t x = x 2, x = x 1 ) = odds(x 2 ) odds(x 1 ) > beta <- r.logl$coef[2:3] > exp(alpha * (c(0, 50) - c(1, 0)) %*% beta) [,1] [1,] = exp [ α(log(t) β 0 β 1 X 2,1... β p X 2,p )] exp [ α(log(t) β 0 β 1 X 1,1... β p X 1,p )] = exp [ α(x 2 x 1 )β ] Thus the odds-ratio (P[survives]/P[dies]) of a 50-year-old nondiabetic is almost 9 times as large as the odds ratio a diabetics. This ratio holds for all times t.
Typical Survival Data Arising From a Clinical Trial. Censoring. The Survivor Function. Mathematical Definitions Introduction
Outline CHL 5225H Advanced Statistical Methods for Clinical Trials: Survival Analysis Prof. Kevin E. Thorpe Defining Survival Data Mathematical Definitions Non-parametric Estimates of Survival Comparing
More informationChapter 4 Regression Models
23.August 2010 Chapter 4 Regression Models The target variable T denotes failure time We let x = (x (1),..., x (m) ) represent a vector of available covariates. Also called regression variables, regressors,
More informationCensoring. Time to Event (Survival) Data. Special features of time to event (survival) data: Strictly non-negative observations
Time to Event (Survival) Data Survival analysis is the analysis of observed times from a well defined origin to the occurrence of a particular event or end-point. Time from entry into a clinical trial
More informationSurvival Analysis. STAT 526 Professor Olga Vitek
Survival Analysis STAT 526 Professor Olga Vitek May 4, 2011 9 Survival Data and Survival Functions Statistical analysis of time-to-event data Lifetime of machines and/or parts (called failure time analysis
More informationSTAT 526 Spring Final Exam. Thursday May 5, 2011
STAT 526 Spring 2011 Final Exam Thursday May 5, 2011 Time: 2 hours Name (please print): Show all your work and calculations. Partial credit will be given for work that is partially correct. Points will
More informationSurvival Models. Patrick Lam. February 1, 2008
Survival Models Patrick Lam February 1, 2008 Outline Basics Underlying Math Parametric Survival Models The Cox Proportional Hazards Model Beck, Katz, and Tucker 1998 Conclusion Outline Basics Underlying
More informationMAS3301 / MAS8311 Biostatistics Part II: Survival
MAS330 / MAS83 Biostatistics Part II: Survival M. Farrow School of Mathematics and Statistics Newcastle University Semester 2, 2009-0 8 Parametric models 8. Introduction In the last few sections (the KM
More informationGeneralized linear models for binary data. A better graphical exploratory data analysis. The simple linear logistic regression model
Stat 3302 (Spring 2017) Peter F. Craigmile Simple linear logistic regression (part 1) [Dobson and Barnett, 2008, Sections 7.1 7.3] Generalized linear models for binary data Beetles dose-response example
More informationInteractions in Logistic Regression
Interactions in Logistic Regression > # UCBAdmissions is a 3-D table: Gender by Dept by Admit > # Same data in another format: > # One col for Yes counts, another for No counts. > Berkeley = read.table("http://www.utstat.toronto.edu/~brunner/312f12/
More informationADVANCED STATISTICAL ANALYSIS OF EPIDEMIOLOGICAL STUDIES. Cox s regression analysis Time dependent explanatory variables
ADVANCED STATISTICAL ANALYSIS OF EPIDEMIOLOGICAL STUDIES Cox s regression analysis Time dependent explanatory variables Henrik Ravn Bandim Health Project, Statens Serum Institut 4 November 2011 1 / 53
More informationStatistical Methods III Statistics 212. Problem Set 2 - Answer Key
Statistical Methods III Statistics 212 Problem Set 2 - Answer Key 1. (Analysis to be turned in and discussed on Tuesday, April 24th) The data for this problem are taken from long-term followup of 1423
More informationRegression so far... Lecture 21 - Logistic Regression. Odds. Recap of what you should know how to do... At this point we have covered: Sta102 / BME102
Background Regression so far... Lecture 21 - Sta102 / BME102 Colin Rundel November 18, 2014 At this point we have covered: Simple linear regression Relationship between numerical response and a numerical
More informationIntroduction and Single Predictor Regression. Correlation
Introduction and Single Predictor Regression Dr. J. Kyle Roberts Southern Methodist University Simmons School of Education and Human Development Department of Teaching and Learning Correlation A correlation
More informationLogistic Regression. 1 Analysis of the budworm moth data 1. 2 Estimates and confidence intervals for the parameters 2
Logistic Regression Ulrich Halekoh, Jørgen Vinslov Hansen, Søren Højsgaard Biometry Research Unit Danish Institute of Agricultural Sciences March 31, 2006 Contents 1 Analysis of the budworm moth data 1
More informationParametric survival analysis
Chapter 6 Parametric survival analysis Until now, most of the course has focused on non- or semi-parametric methods, namely the Kaplan Meier estimate of S(t) and the Cox model its extensions. The Cox model
More informationMAS3301 / MAS8311 Biostatistics Part II: Survival
MAS3301 / MAS8311 Biostatistics Part II: Survival M. Farrow School of Mathematics and Statistics Newcastle University Semester 2, 2009-10 1 13 The Cox proportional hazards model 13.1 Introduction In the
More informationSTA 450/4000 S: January
STA 450/4000 S: January 6 005 Notes Friday tutorial on R programming reminder office hours on - F; -4 R The book Modern Applied Statistics with S by Venables and Ripley is very useful. Make sure you have
More informationA Handbook of Statistical Analyses Using R 2nd Edition. Brian S. Everitt and Torsten Hothorn
A Handbook of Statistical Analyses Using R 2nd Edition Brian S. Everitt and Torsten Hothorn CHAPTER 7 Logistic Regression and Generalised Linear Models: Blood Screening, Women s Role in Society, Colonic
More informationTruck prices - linear model? Truck prices - log transform of the response variable. Interpreting models with log transformation
Background Regression so far... Lecture 23 - Sta 111 Colin Rundel June 17, 2014 At this point we have covered: Simple linear regression Relationship between numerical response and a numerical or categorical
More informationA Handbook of Statistical Analyses Using R. Brian S. Everitt and Torsten Hothorn
A Handbook of Statistical Analyses Using R Brian S. Everitt and Torsten Hothorn CHAPTER 6 Logistic Regression and Generalised Linear Models: Blood Screening, Women s Role in Society, and Colonic Polyps
More informationGeneralised linear models. Response variable can take a number of different formats
Generalised linear models Response variable can take a number of different formats Structure Limitations of linear models and GLM theory GLM for count data GLM for presence \ absence data GLM for proportion
More informationMultinomial Logistic Regression Models
Stat 544, Lecture 19 1 Multinomial Logistic Regression Models Polytomous responses. Logistic regression can be extended to handle responses that are polytomous, i.e. taking r>2 categories. (Note: The word
More informationR Hints for Chapter 10
R Hints for Chapter 10 The multiple logistic regression model assumes that the success probability p for a binomial random variable depends on independent variables or design variables x 1, x 2,, x k.
More informationTwo Hours. Mathematical formula books and statistical tables are to be provided THE UNIVERSITY OF MANCHESTER. 26 May :00 16:00
Two Hours MATH38052 Mathematical formula books and statistical tables are to be provided THE UNIVERSITY OF MANCHESTER GENERALISED LINEAR MODELS 26 May 2016 14:00 16:00 Answer ALL TWO questions in Section
More informationExercise 5.4 Solution
Exercise 5.4 Solution Niels Richard Hansen University of Copenhagen May 7, 2010 1 5.4(a) > leukemia
More informationLogistic Regression. Some slides from Craig Burkett. STA303/STA1002: Methods of Data Analysis II, Summer 2016 Michael Guerzhoy
Logistic Regression Some slides from Craig Burkett STA303/STA1002: Methods of Data Analysis II, Summer 2016 Michael Guerzhoy Titanic Survival Case Study The RMS Titanic A British passenger liner Collided
More informationLogistic Regressions. Stat 430
Logistic Regressions Stat 430 Final Project Final Project is, again, team based You will decide on a project - only constraint is: you are supposed to use techniques for a solution that are related to
More informationREGRESSION ANALYSIS FOR TIME-TO-EVENT DATA THE PROPORTIONAL HAZARDS (COX) MODEL ST520
REGRESSION ANALYSIS FOR TIME-TO-EVENT DATA THE PROPORTIONAL HAZARDS (COX) MODEL ST520 Department of Statistics North Carolina State University Presented by: Butch Tsiatis, Department of Statistics, NCSU
More informationExam Applied Statistical Regression. Good Luck!
Dr. M. Dettling Summer 2011 Exam Applied Statistical Regression Approved: Tables: Note: Any written material, calculator (without communication facility). Attached. All tests have to be done at the 5%-level.
More informationST3241 Categorical Data Analysis I Multicategory Logit Models. Logit Models For Nominal Responses
ST3241 Categorical Data Analysis I Multicategory Logit Models Logit Models For Nominal Responses 1 Models For Nominal Responses Y is nominal with J categories. Let {π 1,, π J } denote the response probabilities
More informationssh tap sas913, sas https://www.statlab.umd.edu/sasdoc/sashtml/onldoc.htm
Kedem, STAT 430 SAS Examples: Logistic Regression ==================================== ssh abc@glue.umd.edu, tap sas913, sas https://www.statlab.umd.edu/sasdoc/sashtml/onldoc.htm a. Logistic regression.
More informationChapter 7 Fall Chapter 7 Hypothesis testing Hypotheses of interest: (A) 1-sample
Bios 323: Applied Survival Analysis Qingxia (Cindy) Chen Chapter 7 Fall 2012 Chapter 7 Hypothesis testing Hypotheses of interest: (A) 1-sample H 0 : S(t) = S 0 (t), where S 0 ( ) is known survival function,
More informationSTAT 7030: Categorical Data Analysis
STAT 7030: Categorical Data Analysis 5. Logistic Regression Peng Zeng Department of Mathematics and Statistics Auburn University Fall 2012 Peng Zeng (Auburn University) STAT 7030 Lecture Notes Fall 2012
More informationAccelerated Failure Time Models
Accelerated Failure Time Models Patrick Breheny October 12 Patrick Breheny University of Iowa Survival Data Analysis (BIOS 7210) 1 / 29 The AFT model framework Last time, we introduced the Weibull distribution
More informationProportional Odds Logistic Regression. stat 557 Heike Hofmann
Proportional Odds Logistic Regression stat 557 Heike Hofmann Outline Proportional Odds Logistic Regression Model Definition Properties Latent Variables Intro to Loglinear Models Ordinal Response Y is categorical
More informationSection IX. Introduction to Logistic Regression for binary outcomes. Poisson regression
Section IX Introduction to Logistic Regression for binary outcomes Poisson regression 0 Sec 9 - Logistic regression In linear regression, we studied models where Y is a continuous variable. What about
More informationRegression models. Generalized linear models in R. Normal regression models are not always appropriate. Generalized linear models. Examples.
Regression models Generalized linear models in R Dr Peter K Dunn http://www.usq.edu.au Department of Mathematics and Computing University of Southern Queensland ASC, July 00 The usual linear regression
More informationcor(dataset$measurement1, dataset$measurement2, method= pearson ) cor.test(datavector1, datavector2, method= pearson )
Tutorial 7: Correlation and Regression Correlation Used to test whether two variables are linearly associated. A correlation coefficient (r) indicates the strength and direction of the association. A correlation
More informationBinary Regression. GH Chapter 5, ISL Chapter 4. January 31, 2017
Binary Regression GH Chapter 5, ISL Chapter 4 January 31, 2017 Seedling Survival Tropical rain forests have up to 300 species of trees per hectare, which leads to difficulties when studying processes which
More informationLet s see if we can predict whether a student returns or does not return to St. Ambrose for their second year.
Assignment #13: GLM Scenario: Over the past few years, our first-to-second year retention rate has ranged from 77-80%. In other words, 77-80% of our first-year students come back to St. Ambrose for their
More informationLogistic Regression - problem 6.14
Logistic Regression - problem 6.14 Let x 1, x 2,, x m be given values of an input variable x and let Y 1,, Y m be independent binomial random variables whose distributions depend on the corresponding values
More informationThe coxvc_1-1-1 package
Appendix A The coxvc_1-1-1 package A.1 Introduction The coxvc_1-1-1 package is a set of functions for survival analysis that run under R2.1.1 [81]. This package contains a set of routines to fit Cox models
More informationAnswer Key for STAT 200B HW No. 8
Answer Key for STAT 200B HW No. 8 May 8, 2007 Problem 3.42 p. 708 The values of Ȳ for x 00, 0, 20, 30 are 5/40, 0, 20/50, and, respectively. From Corollary 3.5 it follows that MLE exists i G is identiable
More information9 Generalized Linear Models
9 Generalized Linear Models The Generalized Linear Model (GLM) is a model which has been built to include a wide range of different models you already know, e.g. ANOVA and multiple linear regression models
More informationHow to work correctly statistically about sex ratio
How to work correctly statistically about sex ratio Marc Girondot Version of 12th April 2014 Contents 1 Load packages 2 2 Introduction 2 3 Confidence interval of a proportion 4 3.1 Pourcentage..............................
More informationCOMPLEMENTARY LOG-LOG MODEL
COMPLEMENTARY LOG-LOG MODEL Under the assumption of binary response, there are two alternatives to logit model: probit model and complementary-log-log model. They all follow the same form π ( x) =Φ ( α
More informationUNIVERSITY OF TORONTO. Faculty of Arts and Science APRIL 2010 EXAMINATIONS STA 303 H1S / STA 1002 HS. Duration - 3 hours. Aids Allowed: Calculator
UNIVERSITY OF TORONTO Faculty of Arts and Science APRIL 2010 EXAMINATIONS STA 303 H1S / STA 1002 HS Duration - 3 hours Aids Allowed: Calculator LAST NAME: FIRST NAME: STUDENT NUMBER: There are 27 pages
More informationChecking model assumptions with regression diagnostics
@graemeleehickey www.glhickey.com graeme.hickey@liverpool.ac.uk Checking model assumptions with regression diagnostics Graeme L. Hickey University of Liverpool Conflicts of interest None Assistant Editor
More informationLogistic Regression. James H. Steiger. Department of Psychology and Human Development Vanderbilt University
Logistic Regression James H. Steiger Department of Psychology and Human Development Vanderbilt University James H. Steiger (Vanderbilt University) Logistic Regression 1 / 38 Logistic Regression 1 Introduction
More informationGeneralized logit models for nominal multinomial responses. Local odds ratios
Generalized logit models for nominal multinomial responses Categorical Data Analysis, Summer 2015 1/17 Local odds ratios Y 1 2 3 4 1 π 11 π 12 π 13 π 14 π 1+ X 2 π 21 π 22 π 23 π 24 π 2+ 3 π 31 π 32 π
More informationContrasting Marginal and Mixed Effects Models Recall: two approaches to handling dependence in Generalized Linear Models:
Contrasting Marginal and Mixed Effects Models Recall: two approaches to handling dependence in Generalized Linear Models: Marginal models: based on the consequences of dependence on estimating model parameters.
More information5. Parametric Regression Model
5. Parametric Regression Model The Accelerated Failure Time (AFT) Model Denote by S (t) and S 2 (t) the survival functions of two populations. The AFT model says that there is a constant c > 0 such that
More information8. Parametric models in survival analysis General accelerated failure time models for parametric regression
8. Parametric models in survival analysis 8.1. General accelerated failure time models for parametric regression The accelerated failure time model Let T be the time to event and x be a vector of covariates.
More informationReaction Days
Stat April 03 Week Fitting Individual Trajectories # Straight-line, constant rate of change fit > sdat = subset(sleepstudy, Subject == "37") > sdat Reaction Days Subject > lm.sdat = lm(reaction ~ Days)
More informationBooklet of Code and Output for STAD29/STA 1007 Midterm Exam
Booklet of Code and Output for STAD29/STA 1007 Midterm Exam List of Figures in this document by page: List of Figures 1 Packages................................ 2 2 Hospital infection risk data (some).................
More informationIntroduction to Statistics and R
Introduction to Statistics and R Mayo-Illinois Computational Genomics Workshop (2018) Ruoqing Zhu, Ph.D. Department of Statistics, UIUC rqzhu@illinois.edu June 18, 2018 Abstract This document is a supplimentary
More information1. Hypothesis testing through analysis of deviance. 3. Model & variable selection - stepwise aproaches
Sta 216, Lecture 4 Last Time: Logistic regression example, existence/uniqueness of MLEs Today s Class: 1. Hypothesis testing through analysis of deviance 2. Standard errors & confidence intervals 3. Model
More informationtime = c(4.5, 3.9, 1.0, 2.3, 4.8, 0.1, 0.3, 2.0, 0.8, 3.0, 0.3, 2.1) answer = c( 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0)
Chapter 15. Censored Data Models Suppose you are given a small data set from a call center on how long the customers stayed on the phone, until either hanging up or being answered. The data set looks like
More informationSurvival analysis in R
Survival analysis in R Niels Richard Hansen This note describes a few elementary aspects of practical analysis of survival data in R. For further information we refer to the book Introductory Statistics
More informationSection Poisson Regression
Section 14.13 Poisson Regression Timothy Hanson Department of Statistics, University of South Carolina Stat 705: Data Analysis II 1 / 26 Poisson regression Regular regression data {(x i, Y i )} n i=1,
More informationLogistic Regression. Interpretation of linear regression. Other types of outcomes. 0-1 response variable: Wound infection. Usual linear regression
Logistic Regression Usual linear regression (repetition) y i = b 0 + b 1 x 1i + b 2 x 2i + e i, e i N(0,σ 2 ) or: y i N(b 0 + b 1 x 1i + b 2 x 2i,σ 2 ) Example (DGA, p. 336): E(PEmax) = 47.355 + 1.024
More informationChapter 20: Logistic regression for binary response variables
Chapter 20: Logistic regression for binary response variables In 1846, the Donner and Reed families left Illinois for California by covered wagon (87 people, 20 wagons). They attempted a new and untried
More informationClassification. Chapter Introduction. 6.2 The Bayes classifier
Chapter 6 Classification 6.1 Introduction Often encountered in applications is the situation where the response variable Y takes values in a finite set of labels. For example, the response Y could encode
More informationSTA6938-Logistic Regression Model
Dr. Ying Zhang STA6938-Logistic Regression Model Topic 2-Multiple Logistic Regression Model Outlines:. Model Fitting 2. Statistical Inference for Multiple Logistic Regression Model 3. Interpretation of
More informationYou can specify the response in the form of a single variable or in the form of a ratio of two variables denoted events/trials.
The GENMOD Procedure MODEL Statement MODEL response = < effects > < /options > ; MODEL events/trials = < effects > < /options > ; You can specify the response in the form of a single variable or in the
More informationLogistic regression model for survival time analysis using time-varying coefficients
Logistic regression model for survival time analysis using time-varying coefficients Accepted in American Journal of Mathematical and Management Sciences, 2016 Kenichi SATOH ksatoh@hiroshima-u.ac.jp Research
More informationGeneralized linear models
Generalized linear models Douglas Bates November 01, 2010 Contents 1 Definition 1 2 Links 2 3 Estimating parameters 5 4 Example 6 5 Model building 8 6 Conclusions 8 7 Summary 9 1 Generalized Linear Models
More informationReview: what is a linear model. Y = β 0 + β 1 X 1 + β 2 X 2 + A model of the following form:
Outline for today What is a generalized linear model Linear predictors and link functions Example: fit a constant (the proportion) Analysis of deviance table Example: fit dose-response data using logistic
More informationHandout 4: Simple Linear Regression
Handout 4: Simple Linear Regression By: Brandon Berman The following problem comes from Kokoska s Introductory Statistics: A Problem-Solving Approach. The data can be read in to R using the following code:
More informationx3,..., Multiple Regression β q α, β 1, β 2, β 3,..., β q in the model can all be estimated by least square estimators
Multiple Regression Relating a response (dependent, input) y to a set of explanatory (independent, output, predictor) variables x, x 2, x 3,, x q. A technique for modeling the relationship between variables.
More informationSTA 4504/5503 Sample Exam 1 Spring 2011 Categorical Data Analysis. 1. Indicate whether each of the following is true (T) or false (F).
STA 4504/5503 Sample Exam 1 Spring 2011 Categorical Data Analysis 1. Indicate whether each of the following is true (T) or false (F). (a) T In 2 2 tables, statistical independence is equivalent to a population
More informationSTA 4504/5503 Sample Exam 1 Spring 2011 Categorical Data Analysis. 1. Indicate whether each of the following is true (T) or false (F).
STA 4504/5503 Sample Exam 1 Spring 2011 Categorical Data Analysis 1. Indicate whether each of the following is true (T) or false (F). (a) (b) (c) (d) (e) In 2 2 tables, statistical independence is equivalent
More informationCase-control studies C&H 16
Case-control studies C&H 6 Bendix Carstensen Steno Diabetes Center & Department of Biostatistics, University of Copenhagen bxc@steno.dk http://bendixcarstensen.com PhD-course in Epidemiology, Department
More informationBeyond GLM and likelihood
Stat 6620: Applied Linear Models Department of Statistics Western Michigan University Statistics curriculum Core knowledge (modeling and estimation) Math stat 1 (probability, distributions, convergence
More informationChapter 5 Exercises 1
Chapter 5 Exercises 1 Data Analysis & Graphics Using R, 2 nd edn Solutions to Exercises (December 13, 2006) Preliminaries > library(daag) Exercise 2 For each of the data sets elastic1 and elastic2, determine
More informationCox s proportional hazards model and Cox s partial likelihood
Cox s proportional hazards model and Cox s partial likelihood Rasmus Waagepetersen October 12, 2018 1 / 27 Non-parametric vs. parametric Suppose we want to estimate unknown function, e.g. survival function.
More informationUnit 5 Logistic Regression Practice Problems
Unit 5 Logistic Regression Practice Problems SOLUTIONS R Users Source: Afifi A., Clark VA and May S. Computer Aided Multivariate Analysis, Fourth Edition. Boca Raton: Chapman and Hall, 2004. Exercises
More informationSimple logistic regression
Simple logistic regression Biometry 755 Spring 2009 Simple logistic regression p. 1/47 Model assumptions 1. The observed data are independent realizations of a binary response variable Y that follows a
More informationlme4 Luke Chang Last Revised July 16, Fitting Linear Mixed Models with a Varying Intercept
lme4 Luke Chang Last Revised July 16, 2010 1 Using lme4 1.1 Fitting Linear Mixed Models with a Varying Intercept We will now work through the same Ultimatum Game example from the regression section and
More informationLecture 14: Introduction to Poisson Regression
Lecture 14: Introduction to Poisson Regression Ani Manichaikul amanicha@jhsph.edu 8 May 2007 1 / 52 Overview Modelling counts Contingency tables Poisson regression models 2 / 52 Modelling counts I Why
More informationModelling counts. Lecture 14: Introduction to Poisson Regression. Overview
Modelling counts I Lecture 14: Introduction to Poisson Regression Ani Manichaikul amanicha@jhsph.edu Why count data? Number of traffic accidents per day Mortality counts in a given neighborhood, per week
More informationNonlinear Models. What do you do when you don t have a line? What do you do when you don t have a line? A Quadratic Adventure
What do you do when you don t have a line? Nonlinear Models Spores 0e+00 2e+06 4e+06 6e+06 8e+06 30 40 50 60 70 longevity What do you do when you don t have a line? A Quadratic Adventure 1. If nonlinear
More informationLecture 7 Time-dependent Covariates in Cox Regression
Lecture 7 Time-dependent Covariates in Cox Regression So far, we ve been considering the following Cox PH model: λ(t Z) = λ 0 (t) exp(β Z) = λ 0 (t) exp( β j Z j ) where β j is the parameter for the the
More informationGov 2001: Section 4. February 20, Gov 2001: Section 4 February 20, / 39
Gov 2001: Section 4 February 20, 2013 Gov 2001: Section 4 February 20, 2013 1 / 39 Outline 1 The Likelihood Model with Covariates 2 Likelihood Ratio Test 3 The Central Limit Theorem and the MLE 4 What
More informationGeneralized linear models
Generalized linear models Outline for today What is a generalized linear model Linear predictors and link functions Example: estimate a proportion Analysis of deviance Example: fit dose- response data
More informationCase-control studies
Matched and nested case-control studies Bendix Carstensen Steno Diabetes Center, Gentofte, Denmark b@bxc.dk http://bendixcarstensen.com Department of Biostatistics, University of Copenhagen, 8 November
More informationSCHOOL OF MATHEMATICS AND STATISTICS. Linear and Generalised Linear Models
SCHOOL OF MATHEMATICS AND STATISTICS Linear and Generalised Linear Models Autumn Semester 2017 18 2 hours Attempt all the questions. The allocation of marks is shown in brackets. RESTRICTED OPEN BOOK EXAMINATION
More informationWeek 7 Multiple factors. Ch , Some miscellaneous parts
Week 7 Multiple factors Ch. 18-19, Some miscellaneous parts Multiple Factors Most experiments will involve multiple factors, some of which will be nuisance variables Dealing with these factors requires
More informationβ j = coefficient of x j in the model; β = ( β1, β2,
Regression Modeling of Survival Time Data Why regression models? Groups similar except for the treatment under study use the nonparametric methods discussed earlier. Groups differ in variables (covariates)
More informationSSUI: Presentation Hints 2 My Perspective Software Examples Reliability Areas that need work
SSUI: Presentation Hints 1 Comparing Marginal and Random Eects (Frailty) Models Terry M. Therneau Mayo Clinic April 1998 SSUI: Presentation Hints 2 My Perspective Software Examples Reliability Areas that
More informationConsider fitting a model using ordinary least squares (OLS) regression:
Example 1: Mating Success of African Elephants In this study, 41 male African elephants were followed over a period of 8 years. The age of the elephant at the beginning of the study and the number of successful
More informationBasic Medical Statistics Course
Basic Medical Statistics Course S7 Logistic Regression November 2015 Wilma Heemsbergen w.heemsbergen@nki.nl Logistic Regression The concept of a relationship between the distribution of a dependent variable
More information171:162 Design and Analysis of Biomedical Studies, Summer 2011 Exam #3, July 16th
Name 171:162 Design and Analysis of Biomedical Studies, Summer 2011 Exam #3, July 16th Use the selected SAS output to help you answer the questions. The SAS output is all at the back of the exam on pages
More informationChapter 5 Exercises 1. Data Analysis & Graphics Using R Solutions to Exercises (April 24, 2004)
Chapter 5 Exercises 1 Data Analysis & Graphics Using R Solutions to Exercises (April 24, 2004) Preliminaries > library(daag) Exercise 2 The final three sentences have been reworded For each of the data
More informationBooklet of Code and Output for STAD29/STA 1007 Midterm Exam
Booklet of Code and Output for STAD29/STA 1007 Midterm Exam List of Figures in this document by page: List of Figures 1 NBA attendance data........................ 2 2 Regression model for NBA attendances...............
More informationAdministration. Homework 1 on web page, due Feb 11 NSERC summer undergraduate award applications due Feb 5 Some helpful books
STA 44/04 Jan 6, 00 / 5 Administration Homework on web page, due Feb NSERC summer undergraduate award applications due Feb 5 Some helpful books STA 44/04 Jan 6, 00... administration / 5 STA 44/04 Jan 6,
More informationIn contrast, parametric techniques (fitting exponential or Weibull, for example) are more focussed, can handle general covariates, but require
Chapter 5 modelling Semi parametric We have considered parametric and nonparametric techniques for comparing survival distributions between different treatment groups. Nonparametric techniques, such as
More informationTime-dependent covariates
Time-dependent covariates Rasmus Waagepetersen November 5, 2018 1 / 10 Time-dependent covariates Our excursion into the realm of counting process and martingales showed that it poses no problems to introduce
More informationChapter 4 Fall Notations: t 1 < t 2 < < t D, D unique death times. d j = # deaths at t j = n. Y j = # at risk /alive at t j = n
Bios 323: Applied Survival Analysis Qingxia (Cindy) Chen Chapter 4 Fall 2012 4.2 Estimators of the survival and cumulative hazard functions for RC data Suppose X is a continuous random failure time with
More informationModels for Count and Binary Data. Poisson and Logistic GWR Models. 24/07/2008 GWR Workshop 1
Models for Count and Binary Data Poisson and Logistic GWR Models 24/07/2008 GWR Workshop 1 Outline I: Modelling counts Poisson regression II: Modelling binary events Logistic Regression III: Poisson Regression
More information