Presentation is loading. Please wait.

Presentation is loading. Please wait.

G89.2247 Lecture 121 Analysis of Time to Event Survival Analysis Language Example of time to high anxiety Discrete survival analysis through logistic regression.

Similar presentations


Presentation on theme: "G89.2247 Lecture 121 Analysis of Time to Event Survival Analysis Language Example of time to high anxiety Discrete survival analysis through logistic regression."— Presentation transcript:

1 G89.2247 Lecture 121 Analysis of Time to Event Survival Analysis Language Example of time to high anxiety Discrete survival analysis through logistic regression Examples Final comments

2 G89.2247 Lecture 122 Analysis of Time to Event Often we are interested the occurrence of key events in time  Attainment of positive development Speaking first word Taking first step Finishing first doctorate  Occurrence of negative outcome Death Relapse following treatment for smoking, drug use Illness among persons at risk

3 G89.2247 Lecture 123 Survival Analysis / Life Table Analysis Demographers and Biostatisticians developed a set of methods to look at time to death (time of survival) that are called Survival Analyses. Key features of methods  Focuses on conditional probability of survival (demise) in a period, given that one has survived to that point  Includes data on persons who survive throughout full observation period  Can take into account “censoring” of data – loss to followup that is unrelated to outcome  Recently include methods that allow multivariate modeling of survival

4 G89.2247 Lecture 124 Example from Bar Exam We expect persons preparing for the bar exam to be progressively more anxious as the exam draws near If Anxiety passes some threshold, it may be disruptive On the average, how long can people keep their cool?  Define “cool” as having anxiety POMS scores less than 3.0 on a 0-4 scale. How many people have high anxiety days?

5 G89.2247 Lecture 125 Time to High Anxiety Suppose we looked at time to first Anxious Day in males and females  38% of males never had a high anxious day  35% of females never had a high anxious day Average time to anxious day appears to be shorter for females than males  17.7 days for females  22.3 days for males  both estimates are biased (too small), since I included values of 31 days for persons who did not experience anxiety. Bias would have been greater had I excluded those cases This illustrates problem of censoring

6 G89.2247 Lecture 126 Survival Analysis Terminology Survival probability is the probability of surviving to time t. It tends to decrease over time. Call this S.  Survival Function describes the survival probabilities over time  Survival probabilities accumulate failure events. Hazard (h) describes the time-specific probability of the event among persons who have survived to time t.  Hazard Function describes the hazard over time  For discrete time periods (such as weeks) it is a probability  For small time periods (continuous time) it is an instantaneous risk. Relation of S to h: S t+1 =S t *(1-h t )

7 G89.2247 Lecture 127 Example of Survival and Hazard Functions from Singer & Willett In this example of smoking relapse following smoking cessation treatment, the relapse rate is highest at first and then there is a flattening of the curve. Note that it is monotonic (it never goes back up) The hazard function shows the pattern more dramatically.

8 G89.2247 Lecture 128 Discrete Time Survival Analysis Singer and Willet (1991) describe a logistic regression approach to time-to-event data that takes censoring into account  Assumes that time reports can be discretized into categories that do not lose too much information  Person-times become units of analysis Including only persons who had not previously experienced target event  Uses standard logistic regression programs to model the hazard function  Fits baseline probability of event using discrete dummy code variables

9 G89.2247 Lecture 129 Specific Steps  Create special version of person-time data set Unequal numbers of times per person. Last record for person is either »time when event occurred »time of last followup Dummy codes for time categories need to be created  Apply regular logistic regression software to model probability of an event Include time dummy codes to take into account the possibly nonlinear change in the baseline hazard Can include both time-invariant predictors and time- varying predictors of hazard

10 G89.2247 Lecture 1210 Example of Data Setup DATA NEW; *This step reads data with days as lines; infile 'dayanx.txt'; input id day sex dianx; diaryday=day-1; If day < 32; TITLE1 'G89.2247 Lecture 12 Analyses'; Data new2; *This step creates file with days as variables, persons as lines; array anx[31] a1-a31; array dday[31] d1-d31; do i=1 to 31 until (last.id); set new; by id; anx[i]=dianx; dday[i]=day; end; *Now we tag days beyond first incidence of high anxiety cl1-cl32 are binary indicators of history of anxiety; array clos[32] cl1-cl32 ; do i=1 to 31; clos[i]=0; end; do i=1 to 30; if (anx[i]=1) or (clos[i]=1) then clos[i+1]=1; end; run;

11 G89.2247 Lecture 1211 Example, Continued data new3; *This step creates file with tagged days as lines; set new2; array anx[31] a1-a31; array dday[31] d1-d31; array clos[32] cl1-cl32; past=0; do i=1 to 31; day=dday[i]; dianx=anx[i]; past=clos[i]; output; end; drop i a1-a31 d1-d31 cl1-cl32; data new4; *This creates dummy codes for day and deletes days beyond incident days; set new3; diaryday=day-15; array dumday[31] dm1-dm31; do i=1 to 31; dumday[i]=0; end; dumday[day]=1; if past=0; drop past i; run;

12 G89.2247 Lecture 1212 Output: Eight Time Periods PROC LOGIST ESTIMATES OF LOG ODDS Parameter DF Estimate S. E. Chi-Square Pr > ChiSq dm1 1 -2.8509 0.3559 64.1547 <.0001 dm2 1 -3.5629 0.4977 51.2486 <.0001 dm3 1 -4.0152 0.6192 42.0480 <.0001 dm4 1 -5.0941 1.0244 24.7268 <.0001 dm5 1 -3.0139 0.4439 46.1021 <.0001 dm6 1 -3.4660 0.5564 38.8062 <.0001 dm7 1 -3.6478 0.6246 34.1068 <.0001 dm8 1 -1.6870 0.3771 20.0185 <.0001 sex 1 -0.2312 0.3190 0.5250 0.4687

13 G89.2247 Lecture 1213 Creating Hazard Function First exponetiate the log odds to get odds  Odds of anxiety in females (reference group) Multiply odds for females by odds ratio estimate [exp(-.23)=.794] to get odds for men  The odds for men are about 80% of what they are for women Transform the odds (W) to probabilities (P)  P = W/(1+W)

14 G89.2247 Lecture 1214 Converting Log Odds to Probabilities

15 G89.2247 Lecture 1215 Proportional Hazards vs. Non Proportional Hazards If Gender only enters as a main effect in the logistic model, the odds for men and women are proportional Singer and Willett show how to check this assumption by constructing interaction terms In this example, there is no evidence for interaction When proportional hazard assumptions hold, one can also use “Cox Proportional Hazards” Model  Cox models handle continuous time data  Most common form of multivariate survival analysis  Example is included in Handout

16 G89.2247 Lecture 1216 Special Issues and Considerations Survival analysis makes most sense with random samples of defined populations Followup time should start from some clear event to avoid selection effects To get stable estimates, collect data so that the target event occurs to more than half the sample Generally, survival analyses need larger samples


Download ppt "G89.2247 Lecture 121 Analysis of Time to Event Survival Analysis Language Example of time to high anxiety Discrete survival analysis through logistic regression."

Similar presentations


Ads by Google