JuliaStats / Survival.jl

Survival analysis in Julia
MIT License
73 stars 23 forks source link

EventTables does not exist #52

Closed casasgomezuribarri closed 1 year ago

casasgomezuribarri commented 1 year ago

I'm really happy to have come across this package! Very handy and simple.

I am trying to compute Kaplan-Meier estimates to make a survival curve. I understand from the docs that I need an EventTable to pass to the KaplanMeier function, however, when I do EventTable(eventtimes) I get an error. I checked and it seems that the type EventTable doesn't exist:

using Survival;
? Survival.EventTable

No documentation found.

Binding Survival.EventTable does not exist.

To control my environment is alright:

? Survival.EventTime

EventTime{T}

Immutable object containing the real-valued time to an event as well as an indicator of whether the time corresponds to an observed event (true) or right censoring (false).

Am I doing something wrong? I am using Survival v0.2.2 on Julia 1.8.2

ya0 commented 1 year ago

EventTable is not in the package 0.2.2 i had the same problem when starting to use this module. The documentation is set to latest wich is not 0.2.2 but the current code on github which includes event tables... I have already asked for a version bump #51

p.s. you could use the current github code with

using Pkg; Pkg.add(url="https://github.com/JuliaStats/Survival.jl.git")

or

] add https://github.com/JuliaStats/Survival.jl.git

but this is generaly bad practice :/

ararslan commented 1 year ago

Ah yes, what's on the main branch hasn't yet made it into a release, which as @casasgomezuribarri noticed includes EventTable. As @ya0 noted, the documentation badge in the README defaults to the latest development version rather than the latest tagged version; I should amend that since it's indeed confusing. In the meantime you can select "stable" from the dropdown in the bottom left corner of the online documentation, which will give you the latest tagged version. There were a number of changes I had wanted to make for the next release (atop the many that have already been made) but I haven't had much time for this package lately, unfortunately. I should probably just go ahead and make a release.

ararslan commented 1 year ago

I've changed the documentation badge in the README to point to stable instead of latest and a new stable version, v0.3.0, will be available once https://github.com/JuliaRegistries/General/pull/86456 has been merged. Thanks!

ya0 commented 1 year ago

Thank you @ararslan for the release. I am looking forward to the future of this package!

casasgomezuribarri commented 1 year ago

Thank you @ararslan for the quick release! Gotta love Julia...