Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

st: R: Survival Data - Compare hazards by matching on age (flag: Stata 9.2/SE)


From   "Carlo Lazzaro" <carlo.lazzaro@tin.it>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: R: Survival Data - Compare hazards by matching on age (flag: Stata 9.2/SE)
Date   Tue, 9 Mar 2010 17:25:34 +0100

Asb stata wrote:
"I want to compare the hazard of exit for the two
groups by comparing subjects of the same age across groups. How do I do it
in stata?"

The following:
- sts test group, logrank strata(age) -

may do the trick.

Kind Regards,
Carlo

-----Messaggio originale-----
Da: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] Per conto di asb stata
Inviato: martedì 9 marzo 2010 8.02
A: statalist@hsphsun2.harvard.edu
Oggetto: st: Survival Data - Compare hazards by matching on age

There are two groups of subjects in my data. In the first group, all
subjects are at risk of dying since age 1. In the second group, each subject
becomes at risk of dying from a subject-specific age different from 1. I
want to stset the data properly and graph Kaplan-Meier survival curves for
the two groups. A sample of data is presented below. id is unique subject
id. group is 1 if subjects do not become at risk of dying until flag=1.
Subject 1 becomes at risk of dying only at age 2 or after unlike subjects 3
and 4 which become at risk of dying at age 1. died indicates the actual
failure event. The data is set as multiple-record-per-subject. I do not want
to compare the hazard of exit of the two groups without taking into account
the fact that the members of the first group do not become at risk until a
certain (variable) age. I want to compare the hazard of exit for the two
groups by comparing subjects of the same age across groups. How do I do it
in stata? How to match subjects by age and compare hazard of exit? Is there
another way besides matching on age?

id        group        flag        age        died
1           1             0            1            0
1           1             1            2            0
1           1             1            3            0
1           1             1            4            1
2           1             0            1            0
2           1             0            2            0
 2           1             0            3            0
2           1             0            4            0
 2           1             1            5            0
2           1             1            6            1
3           2             1            1            0
3           2             1            2            0
3           2             1            3            1
4           2             1            1            0
4           2             1            2            0
4           2             1            3            0
4           2             1            4            0
4           2             1            5            1

*
*   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/


*
*   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/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index