On Apr 16, 2012, at 10:24 AM, robgriffin247 wrote:

Hello
I'm trying to make survival curves for some longevity data -
100 males and 100 females, some of which are still living (not dead at the
end of survey)

I would like to make sex specific survival curves as time on the X axis,
proportion alive on the Y, and a line for each sex (two lines)

Data looks like this:
Focal   DOB             DOD             Longevity           Sex
1               89-04-20        na                      na                      
    Female
2               54-02-20        08-04-14        54                          
Female
...

You should be looking at these help pages:

?read.table

?strptime
?as.Date

help(package=survival) # Which should show you where to get its vignette.

?survfit


Any suggestions of functions to use? I've not worked with time data (this is
yy-mm-dd) before so not sure how to handle it
Any tips and advice are greatly appreciated!

Thanks,
Rob

--
View this message in context: 
http://r.789695.n4.nabble.com/Survival-Curves-tp4561685p4561685.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

David Winsemius, MD
West Hartford, CT

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to