-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support for stratification #21
Comments
Not sure if this is what you had in mind but it isn't hard to do this on your own. Suppose you have failure time data and also a variable on whether that thing/person was using DataFrames, Survival, Random
Random.seed!(111)
N = 100
df = DataFrame(cool=rand(Bool,N),time=randexp(N),status=rand(Bool,N))
# create EventTimes
df.evt = EventTime.(df.time,df.status)
# group data
gdf = groupby(df,:cool)
# fit separately for each group
KMs = [ fit(KaplanMeier,g.evt) for g in gdf] |
if you can add this example to the documentation it will help a lot of people. I myself had to google to come up with this example. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Are there are any plans to support stratification for the
K-M
fit?The text was updated successfully, but these errors were encountered: