Download presentation
1
Event History Analysis 7
Sociology 8811 Lecture 21 Copyright © 2007 by Evan Schofer Do not copy or distribute without permission
2
Announcements Paper Assignment #2 Due April 26 Class topic:
Try to find a dataset soon Class topic: Parametric EHA models; diagnostics Later (if time allows): AFT models, discrete time models
3
Parametric Proportional Hazard Models
Cox models do not specify a functional form for the hazard curve, h(t) Rather, they examine effects of variables net of a baseline hazard trend (to be inferred from the data) h(t) = h0(t)ebX = h0(t)exp(bX) Parametric models specify the general shape of the hazard curve Approach is more familiar – more like regression We can model Y as a constant, a linear function, a logit function, a binomial function (poisson), etc For instance, we could assume h(t) was a linear Then solve for values of a hazard slope that best fit the data (plus effects of other covariates on hazard rate).
4
Parametric Proportional Hazard Models
Parametric models work best when you choose a curve that fits the data Just like OLS regression – which works best when the relationship between two variables is roughly linear If the actual relationship between two variables is non-linear, coefficient estimates may be incorrect Though sometimes one can transform variables (e.g., logging them) to get a good fit… Parametric models are more efficient than Cox models They can generate more precise estimates for a given sample size But, they can also be more wildly incorrect if you mis-specify h(t)! Note: These are proportional hazard models – like Cox! You must still check the proportional hazard assumption.
5
Exponential (Constant Rate) Model
Exponential models are simplest: Note that there is no “t” in the equation… no coefficient that specifies time dependence of the hazard rate Rather, there are just exponentiated BXs PLUS: a, the constant Note 2: Box-Steffensmeier & Jones: h(t)=e-(bX) An exponential model solves for the constant value (a) that best fits the data… Along with values of Bs, which reflect effects of X vars In effect, the model assumes a constant hazard rate .
6
Exponential (Constant Rate) Model
Another way of looking at it: An exponential model is a lot like a cox model But, with the assumption that the baseline hazard is a constant! Exponential Cox
7
Exponential (Constant Rate) Model
Basic Model. Constant reflects base rate . streg gdp degradation education democracy ngo ingo, dist(exponential) nohr Exponential regression -- log relative-hazard form No. of subjects = Number of obs = No. of failures = Time at risk = Wald chi2(6) = Log pseudolikelihood = Prob > chi2 = | Robust _t | Coef. Std. Err z P>|z| [95% Conf. Interval] gdp | degradation | education | democracy | ngo | ingo | _cons | Constant shows base hazard rate estimated from data: exp(-4.57) = .01
8
Exponential (Constant Rate) Model
Suppose we plotted the baseline hazard rate estimated from our exponential model It would be a flat line: h(t) = .01 This is the estimated hazard if all X vars are zero If we plotted the estimated hazard for some values of X (ex: democracy = 10), we would get a higher value Since democracy has a positive effect, Democ = 10 would yield a higher hazard than democ = 0 But, again, the estimated hazard rate trend would be a flat line over time…
9
Exponential Model: Baseline Hazard
Ex: stcurve, hazard See, the estimated baseline hazard really is flat!
10
Exponential Model: Estimated Hazard
stcurve, hazard at1(democ=1) at2(democ=10) Here are estimated hazards for 2 groups Other vars pegged at mean
11
Exponential Model: Baseline Hazard
Issue: Actual hazard is rising. A problem? Is an exponential model appropriate? Answer: It can be, IF we have X variables that account for increasing hazard If not, fit will be poor!
12
Exponential (Constant Rate) Model
Cleves et al. 2004, p. 216: In the exponential model, h(t) being constant means that the failure rate is independent of time, and thus the failure process is said to lack memory. You may be tempted to view exponential regression as suitable for use only in the simplest of cases. This would be unfair. There is another sense in which the exponential model is the basis for all other models. The baseline hazard… is constant … the way in which the overall hazard varies is purely a function of bX. The overall hazard need not be constant with time; it is just that every bit of how the hazard varies must be specified in BX. If you fully understand a process, you should be able to do that. When you do not understand a process, you are forced to assign a role to time, and in that way, you hope, put to the side your ignorance and still describe the part of the process that you do understand. In addition, exponential models can be used to model the overall hazard as a function of time, if they include t or functions of t as covariates.
13
Exponential (Constant Rate) Model
The exponential model is extremely flexible… You specify substantive covariates (X variables) to explain failures It is probably not due to some inherent feature of time, but rather due to some variable that you hope to control for If you do a great job, you will fully explain why hazard rate appears to go up (or down) over time And, you can include functions of time as independent variables to address temporal variation Independent (X) variable scan include time dummies, log time, linear time, time interactions, etc That is, if you can’t explain time variation with substantive X variables, you can add time variables to model it But, if you mis-specify your model, results will be biased In that case, you might be better off with a Cox model…
14
Piecewise Exponential Model
If you have a lot of cases, you can estimate a piecewise model Essentially a separate model for different chunks of time Model will yield different coefficients and base rate (constant) for multiple chunks of time Even if hazard is not constant over time, it may be more or less constant in each period This allows you to effectively model any hazard trend A related approach: Put in time-period dummies This gives a single set of bX coefficient estimates But, allows you to specify changes in the hazard rate over different periods NOTE: Don’t forget to omit one of the time dummies!
15
Parametric Models Let’s try a more complex parametric model
Example: Let’s specify a linear time trend Exponential Linear In this case, we estimate a constant (a) and slope (b0) which best summarize the time dependence of the hazard rate Note: this isn’t common – we have better options…
16
Gompertz Models Another option: an exponentiated line
Rather than a linear function of time and exponentiated function of bX, we’ll exponentiate everything: Exponentiated Linear: Gompertz Slope coefficient is often represented by gamma: g Note: Exponentiation alters the line… it isn’t a simple linear function anymore. It is flat if gamma = 0 It is monotonically increasing if gamma > 0 It is monotonically decreasing if gamma < 0
17
Gompertz Models Exponentiating a linear function generates a curve defined by the value of gamma (g) Model estimates value of g that best fits the data g = 0 g < 0 g > 0 g >> 0
18
Gompertz Model Example: streg gdp degradation education democracy ngo ingo, robust nohr dist(gompertz) Gompertz regression -- log relative-hazard form No. of subjects = Number of obs = No. of failures = Time at risk = Wald chi2(6) = Log pseudolikelihood = Prob > chi2 = _t | Coef. Std. Err z P>|z| [95% Conf. Interval] gdp | degradation | education | democracy | ngo | ingo | _cons | gamma | Model estimates gamma to be positive, significant. Implies increasing baseline hazard
19
Gompertz Model: Estimated Hazard
stcurve, hazard at1(democ=1) at2(democ=10) Estimated hazards for 2 groups Other vars pegged at mean Note: curves are actually proportional – hard to see because bottom curve is nearly zero…
20
Weibull Models Another option: the Weibull curve
Another curve that can fit monatonic hazards Weibull Model estimates p to best fit the model Hazard is flat if p = 1 Hazard is monotonically increasing if p > 1 Hazard is monotonically decreasing if p < 1.
21
Weibull: Visually The Weibull family: Monotonic increasing or decreasing, depending on p Time Hazard Rate p = 1 p = 4 p = .5 p = 2
22
Weibull Model Example: streg gdp degradation education democracy ngo ingo, robust nohr dist(weibull) Weibull regression -- log relative-hazard form No. of subjects = Number of obs = No. of failures = Time at risk = LR chi2(6) = Log likelihood = Prob > chi2 = _t | Coef. Std. Err z P>|z| [95% Conf. Interval] gdp | degradation | education | democracy | ngo | ingo | _cons | /ln_p | p | 1/p |
23
Ancillary Parameters Gompertz & Weibull models have parameters that determine the shape of the curve Gamma (g), p Ex: Bigger g = greater increase of h(t) over time You can actually specify covariate effects on those parameters Effectively allowing a different curve shape across values of X variables Ex: If you think that hazard increases more for men than women, you can look to see if Dmale affects g streg male educ, dist(gompertz) ancillary(male) Model estimates effect of male on hazard AND on gamma…
24
Parametric: Model Fit Parametric models use maximum likelihood estimation (MLE) Comparisons among nested models can be made using a likelihood ratio test (LR test) Just like logit: Addition of groups of variables can be tested with lrtest Some parametric models are themselves nested Ex: A Weibull model simplifies to an exponential model if p = 1 Thus, exponential is nested within Wiebull LR tests can be used to see if Weibull is preferable to exponential.
25
Parametric: Model Fit Parametric models use maximum likelihood estimation (MLE) Comparisons among nested models can be made using a likelihood ratio test (LR test) Just like logit: Addition of groups of variables can be tested with lrtest Some parametric models are themselves nested Ex: A Weibull model simplifies to an exponential model if p = 1 Thus, exponential is nested within Wiebull LR tests can be used to see if Weibull is preferable to exponential.
26
Parametric Model Fit: AIC
Non-nested parametric models can be compared via the Akaike Information Criterion k = # independent variables in the model c = # shape parameters in model (ex: p in Weibull) Exponential has one parameter (a); Weibull has 2. AIC compares likelihoods, but corrects for parameters in the model – rewarding simpler models… Low values = better model fit Even for negative values… is better than -50.
27
Frailty Two kinds of models: Shared Frailty – a “random effects” model
Useful for clustered data (non-independent cases) Can be used with Cox & parametric models We’ll discuss this in detail in coming weeks Unshared Frailty Models for “unobserved heterogeneity” Only available for parametric models Refers to individual-specific (unknown) characteristics that affect likelihood of failure.
28
Unobserved Heterogeneity
Unobserved heterogeneity = differences among cases in risk set that affect failure Think of it as “omitted variable bias” Example: Effect of drug on mortality Question: What half of the patients are smokers but you didn’t know that? An “unobserved” attribute that makes them different Answer: The smokers and non-smokers might have very different hazard rates… But, you wouldn’t know to control for this…
29
Unobserved Heterogeneity
The observed hazard rate is modeled w/o controlling for the cause of the drop off… Observed h(t) Visually: Time (months) Hazard Rate Smokers die early… exhausting the sample. Then h(t) drops off Smokers Non-Smokers
30
Unobserved Heterogeneity
Result of unobserved heterogeneity: 1. Bias in the effects of covariates Due to “uncontrolled antecedents” (Yamaguchi 1991) 2. Problems estimating duration effects Because some leave the risk set early, resulting in a “depressed” rate later on Evidence of decline in hazard rate may be misleading.
31
Unobserved Heterogeneity
Strategies: 1. Develop fully-specified models The best solution 2. Specify the form of the heterogeneity (frailty) Approach: assume unobserved alpha (a) – case-specific factor that makes events more (or less) likely Frailty Model Where h(t) is some familiar model (ex: Weibull) Requires functional form assumptions to estimate Ex: Assume a is gamma (or inv gaussian) distributed…
32
PH Assumption & Outliers
Models discussed today are proportional hazard models… Require the same assumption as Cox models But, most of the “tests” of proportionality are only available in Cox models But: You can still use piecewise models and interaction terms to check the assumption Cumulative Cox-Snell residuals can be used to identify outliers Use “predict”: predict ccs, ccsnell Then, plot residuals by case ID, time, etc.
33
Parametric Models: Outliers
Cumulative Cox-Snell residuals vs case ID Note that Scandinavia has highest residuals Probably not outliers, but interesting nevertheless
34
Accelerated Failure Time Models
An alternative approach: model log time Using parametric approach like exponential or Weibull Focus is time rather than hazard rate But, models are similar to hazard rate models – just in a different “metric” Where last term “e” is assumed to have a distribution that defines the model (e.g., making it Weibull) AFT models aren’t very common in sociology But, don’t be intimidated by them… they are similar to parametric proportional hazard models… But some software presents coefficient signs that are opposite!
35
Discrete Time EHA Models
Another completely different approach to EHA Described in Yamaguchi reading Break time into discrete chunks (ex: months, years) Model dichotomous outcome (event vs. non-event) for all chunks of time Allows use of simple model, like logit Other common discrete time models: Probit, complementary log log models (“cloglog”) Data structure is similar to what we did for time-varying covariates, but… All records must cover the same length of time Logit models don’t weight cases based on start/end time Instead, time in analysis is represented simply by the number of cases.
36
Choosing a Hazard Model
A Cox model is a good starting point Less problems due to accidental mis-specification of the time-dependence of the hazard rate Box-Steffensmeier & Jones point to cites: Cox models are 95% as efficient as parametric models under many circumstances Cox models treat time dependence as a “nuisance”, put the focus on substantive covariates Which is often desirable.
37
Choosing a Hazard Model
Parametric models are good when 1. You have strong theoretical expectations about the hazard rate 2. You are confident that you can fit the time dependence well with a parametric model 3. You need the most efficient estimates possible AGAIN: Substantive model specification is typically more important Biases due to omitted variables are often greater than biases due to poor model choice (e.g., Cox vs. Weibull) Also: In small samples, outliers are likely to be more important.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.