Open ya0 opened 1 year ago
Nice idea! The functionality seems worthwhile to have but I wonder if it would make sense to define it as a method of getindex
or even of the object itself. So with km = KaplanMeier(...)
and a time t
, that would be km[t]
or km(t)
, respectively. What are your thoughts on that?
Yes that would look nice, as in https://docs.julialang.org/en/v1/manual/methods/#Function-like-objects
I have been using kaplan meier estomators and wrote a small function to evaluate the estimator at any timepoint. I have used this to generate statistics or diagnostic plots.
@ararslan if you think this is a usefull feature i can create pull request. I have not looked at the Nelson Aalen estimator but maybe something similar can be done / in general for the nonparametric estimator type.