Advanced Statistical Analysis: Event History Analysis 2
Document Details
Uploaded by ClearerKoala
University of Groningen
Clara Mulder
Tags
Related
- Advanced Statistical Analysis: Event History Analysis 1
- ASA 6 Answers - Event History Analysis
- Advanced Statistical Analysis: Event History Analysis 1
- Advanced Statistical Analysis: Event History Analysis 3
- Analysis of Padre Faura Witnesses the Execution of Rizal PDF
- Palmer Raids Student Materials PDF
Summary
These lecture notes cover Advanced Statistical Analysis focusing on Event History Analysis 2. The document outlines parametric and semiparametric event history models and their applications. It also explains the relationship between survival and hazard functions and how to interpret Cox models using Stata.
Full Transcript
F a c u l t y o f Sp a t i a l Sc i e n c e sF a c u l t y o f Sp a t i a l Sc i e n c e sF a c u l t y o f Sp a t i a l Sc i e n c e sF a c u l t y o f Sp a t i a l Sc i e n c e sAdvanced Statistical Analysis: Event History Analysis 2 Clara Mulder (thanks to colleagues) F a c u l t...
F a c u l t y o f Sp a t i a l Sc i e n c e sF a c u l t y o f Sp a t i a l Sc i e n c e sF a c u l t y o f Sp a t i a l Sc i e n c e sF a c u l t y o f Sp a t i a l Sc i e n c e sAdvanced Statistical Analysis: Event History Analysis 2 Clara Mulder (thanks to colleagues) F a c u l t y o f Sp a t i a l Sc i e n c e sF a c u l t y o f Sp a t i a l Sc i e n c e sF a c u l t y o f Sp a t i a l Sc i e n c e sF a c u l t y o f Sp a t i a l Sc i e n c e s | 2 Today: › Event history analysis 2: • A few words on parametric models • The cumulative hazard • Cox regression (continued) › Literature: • Handbook Chapter 9 (Survival Analysis) F a c u l t y o f Sp a t i a l Sc i e n c e sF a c u l t y o f Sp a t i a l Sc i e n c e sF a c u l t y o f Sp a t i a l Sc i e n c e sF a c u l t y o f Sp a t i a l Sc i e n c e s | 3 Parametric event history models (not practiced): › Specify a functional form the hazard rate h(t) as it evolves / is distributed through time: mathematical function • e.g. polynomial rates (quadratic function) • e.g. Gompertz: hazard decreases monotonically • e.g. Gamma (used for fertility) • e.g. Weibull (flexible 3-parameter function) › Estimate parameters of this function AND the effects of the independent variables F a c u l t y o f Sp a t i a l Sc i e n c e sF a c u l t y o f Sp a t i a l Sc i e n c e sF a c u l t y o f Sp a t i a l Sc i e n c e sF a c u l t y o f Sp a t i a l Sc i e n c e s | 4 The Cox model is semiparametric because: › There is no assumption about the form of h 0 (t) over time . It can take any form, there is no mathematical function describing it › This is unlike fully parametric models › There are parameters for the effects , though (just as in fully parametric models) F a c u l t y o f Sp a t i a l Sc i e n c e sF a c u l t y o f Sp a t i a l Sc i e n c e sF a c u l t y o f Sp a t i a l Sc i e n c e sF a c u l t y o f Sp a t i a l Sc i e n c e s | 5 Relation between survival and hazard › Survival can only go down, hazard may fluctuate › The steeper the survival curve goes down, the [higher? lower?] the hazard › Survival at time t determined by the ‘course’ of the hazard up to time t , therefore: › No direct relationship… but via cumulative hazard Advanced Statistical AnalysisThe Cumulative Hazard function Measures the total amount of risk (hazard) that has been accumulated up to a certain time t. It is the number of times the subject is expected to experience the event until time T (e.g. if we are able to resurrect how many time will we die in 10 years?) Not a straightforward interpretation. It can be used to compute the survival function and for testing model performance. It is not a probability as it can be larger than oneH(t) = F a c u l t y o f Sp a t i a l Sc i e n c e sF a c u l t y o f Sp a t i a l Sc i e n c e sF a c u l t y o f Sp a t i a l Sc i e n c e sF a c u l t y o f Sp a t i a l Sc i e n c e s | 7 From cumulative hazard to survival: › S ( t )=exp(- H ( t )) Survival and Cumulative Distribution Function: › S ( t ) = 1 – F ( t ), F ( t ) = 1 – S ( t ) › F ( t ) is the proportion that has experienced the event; often more intuitive than S ( t ) F a c u l t y o f Sp a t i a l Sc i e n c e sF a c u l t y o f Sp a t i a l Sc i e n c e sF a c u l t y o f Sp a t i a l Sc i e n c e sF a c u l t y o f Sp a t i a l Sc i e n c e s | 8 Cumulative distribution vs cumulative hazard › F ( t ) = 1 – S ( t ) can only go up, same for cumulative hazard › Slope of F ( t ) depends on size of population at risk, slope of cumulative hazard doesn’t › F ( t ) can only between 0 and 1, cumulative hazard can be higher than 1 Advanced Statistical AnalysisThe Cox Model in Stata (continued) Example: Cox regression model of job duration or Plotting the model = predicted (smoothed) hazard and cumulative hazard stcox i. sex stcurve, hazard at( sex ==0) at( sex ==1) /*proportionality forced*/ stcurve, cumhaz /*this is the Kaplan Meier estimate*/ Advanced Statistical AnalysisThe Cox Model in Stata (continued) Example: Cox regression model of job duration or Plotting the predicted survival function (Kaplan Meier, proportionality forced) stcox i. sex stcurve, survival Stcurve, survival at( sex ==0) at( sex ==1) F a c u l t y o f Sp a t i a l Sc i e n c e sF a c u l t y o f Sp a t i a l Sc i e n c e sF a c u l t y o f Sp a t i a l Sc i e n c e sF a c u l t y o f Sp a t i a l Sc i e n c e s | 11 Questions: › If the hazard is constant through time: › What will the Cumulative Hazard look like? › What will the Survival function S ( t ) look like? › What will the Cumulative Distribution function F ( t ) look like? Advanced Statistical AnalysisThe Cox Model in Stata (continued) Example: Cox regression model of job duration Testing the proportionality assumption Log-log plot: lines should not cross stcox i. sex stphplot, by( sex ) The Cox Model in Stata (continued) Example: Cox regression model of job duration Testing the proportionality assumption Plot predicted against observed survival: should look about the same stcox i. sex stcoxkm, by( sex ) Advanced Statistical AnalysisThe Cox Model in STATA: Tip If more than one episode per person (person number = id): Use option vce or robust cluster(idvar) to obtain robust standard errors stcox i. sex , vce(cluster id ) or stcox i. sex , robust cluster( id ) Or, already at stset , use the option: id( id ) (in the example data for quitting a job this does not work, apparently because some respondents had two jobs at the same time) Mind difference between robust and robust cluster! F a c u l t y o f Sp a t i a l Sc i e n c e sF a c u l t y o f Sp a t i a l Sc i e n c e sF a c u l t y o f Sp a t i a l Sc i e n c e sF a c u l t y o f Sp a t i a l Sc i e n c e s | 15 ------------------------------------------------------------------------------ | Robust _t | Coefficient std. err. z P>|z| [95% conf. interval] ------------- +--------------------------------------- ------------------------- sex | women | .4234031 .0990821 4.27 0.000 .2292059 .6176004 --------------------------------------------------------- --------------------- | Robust _t | Haz. ratio std. err. z P>|z| [95% conf. interval] ------------- +---------------------------------------------------------------- sex | women | 1.52715 .1513132 4.27 0.000 1.257601 1.854473 ------------------------------------------------------------------------------ What would be coeff / hazard ratio for men if women would be reference? How do you get from coeff and std error to confidence interval? How do you get from coeff to hazard ratio? And vice versa? Plus: a rough approximation to get from… and vv F a c u l t y o f Sp a t i a l Sc i e n c e sF a c u l t y o f Sp a t i a l Sc i e n c e sF a c u l t y o f Sp a t i a l Sc i e n c e sF a c u l t y o f Sp a t i a l Sc i e n c e s | 16 Questions?