Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Fitting weibull to a survival curve

From   Lars Kroll <[email protected]>
To   [email protected]
Subject   Re: st: Fitting weibull to a survival curve
Date   Thu, 09 Jun 2005 10:03:46 +0200

Try this if St is your Percentage of survival and t your time:

* Your Data
input t St
0 100
1 90
2 30
4 0
* Solution
gen death = 0
replace death = St[_n-1]-St[_n] if _n>1
ctset t death2
cttost, clear
streg , dist(weibull)

(if there are more than one group simply add a variable group and use the group option of ctset)
Hope this helps

Lars E. Kroll
UNI 030 83857614
RKI 030 45473307
Privat 0176 23131352
FAX 069 13306720084

Giulio Rizzoli schrieb:

I have several survival curves from medical papers, describing the follow-up time of patients on the x axis and the % survival on the y axis.
I need to fit a weibull model to this curves to summarize them with 2 parameters , a shape and a scale parameter.
How can be practically done in Stata.
I have to input the time variable and the % survival ?
It is possible to stset these data ?
How should the weibull command be written?
Thanks for help
Giulio Rizzoli , Padova (italy)
Giulio Rizzoli MD FETCS
Cardiochirurgia Padova
tel. 049 821-2408
fax 049 821-2409
e-mail [email protected]
web: http.//

* For searches and help try:

*   For searches and help try:

© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index