Tables.jl integration#25
Conversation
|
That's super useful! Makes it also very easy to use Efron-style [1] survival analysis based on logistic regression: just pass the Table to [1] Efron, Bradley. "Logistic regression, survival analysis, and the Kaplan-Meier curve." Journal of the American statistical Association 83.402 (1988): 414-425. |
|
Hello, Which tests are you looking for before doing the merge ? I think this is a nice feature Thanks |
|
I think it is unlikely that I come back to finish this PR any time soon. Feel free to take it over and add whatever needs to be done to consider it ready to merge! |
|
Apologies for letting this languish for so long! I gave this a fair bit of thought and while I definitely understand the appeal, I think I'm overall not in favor, at least with the current implementation. It effectively forces us to make guarantees about the particular fields of the types, namely that they all need to be vectors of equal length and have some kind of externally meaningful names and values. If we were to add another field to store some kind of intermediate computation or other kind of value, that would either end up getting exposed to the user in a rather surprising way or break this altogether. Now, it's possible to control this stuff with some Something we could do is define things explicitly for each Note that in the meantime, you can do e.g. |
Both Kaplan-Meier and Nelson-Aalen compute the same set of basic counts at each unique time prior to computing their respective quantities of interest. The counts have a notably table-like format, so much so that they can implement the Tables.jl interface with minimal effort. Credit for the idea of integration with Tables.jl goes entirely to Tyler Beacon, author of PR #25, who has been added as a co-author of this commit. Co-Authored-By: Tyler Beason <tbeas12@gmail.com>
Something I stumbled across while working on the previous PR... free Tables.jl integration! Because the existing (+CIF) nonparametric estimators return vectors of equal length, why not go one extra step and make it table friendly?
Before this PR:
Now with it...
Needs tests and I guess a mention somewhere that this is possible.