Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Issue with hazard function generated by sts graph

From   Masashi Miyairi <>
Subject   st: Issue with hazard function generated by sts graph
Date   Mon, 05 Mar 2012 23:30:28 -0500

Hi everyone,

I see something strange when plotting hazard rates by "sts graph, hazard". For example,  when I apply the command to a set of simulated exponential random variables, I get a graph that has a upward sloping part in the very beginning. In theory, this shouldn't be the case because exponential random variables have constant hazards, so the graph shouldn't have a increasing pattern. I am wondering if this issue has been documented, or I am missing something using this command. The following is the code that generates my puzzle.

set obs 5000
* Generate exponential random variables
gen dur = -5*log( uniform() )
* Plot the hazard rates
stset dur
sts graph, hazard tmax(20)

Thank you,
Masashi Miyairi
Department of Economics
University of Western Ontario

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index