Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: Plotting estimated survival functions from two different models
From
Dami Olajide <[email protected]>
To
[email protected]
Subject
st: Plotting estimated survival functions from two different models
Date
Fri, 1 Apr 2011 12:10:11 +0100
Dear Statalist,
I need help to plot estimated survival functions from two different
models (weibull and weibull+selection (dursel)) on a single graph,
with the latter using the approach proposed by Boehmke et al (2005). I
have estimated the two models and the respective predicted hazards
saved respectively. I tried to use a sytax from Gutierrez (2002)
comparing 'parametric fraility and shared fraility survival models,
but it did not work. I have 23,901 observations. I followed the idea
of 'set obs'
set obs 47000
replace _t = _n - 23901 in 23902/47000
then
from the weibull model;
predict hazard_weibull in 23902/47000, hazard
and from the duration with selection model;
predict hazard_dursel in 23902/47000, hazard
then
graph hazard_weibull hazard_dursel _t in 23902/47000, c(11[-]) s(ii) sort ///
l1title ("pop hazard") ///
key1(c(1) "weibull") key2(c(1[-]) "log normal")
I received an error message that "class member function not found".
Can more a experienced STATA user please help?
Thanks
Deane
References:
Boehmke, F., Morey, D., and Shannon, M. (2005). Selection bias and
continuous-time duration models: consequences anf proposed solution.
American Journal of Political Science. Vol. 50 (1): 192-207.
Gutierrez, R.G. (2002). Parametric fraility and shared fraility
survival models. The Stata Journal, 2 (1):22-44.
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/