Skip to content

Commit

Permalink
Merge pull request #17 from JuliaStats/dfk/statsmodels6
Browse files Browse the repository at this point in the history
statsmodels compatibility
  • Loading branch information
ararslan authored Jun 30, 2019
2 parents 3ad464c + 9768e62 commit f5ab838
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ language: julia
os:
- linux
julia:
- 0.7
- 1.0
- 1.1
- nightly
Expand Down
5 changes: 3 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "Survival"
uuid = "8a913413-2070-5976-9d4c-2b364fdc2f7f"
version = "0.1.0"
version = "0.2.0"

[deps]
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
Expand All @@ -10,8 +10,9 @@ StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
StatsModels = "3eaba693-59b7-5ba5-a881-562e759f1c8d"

[compat]
julia = "1"
StatsBase = ">=0.30.0"
StatsModels = "<0.6.0"
StatsModels = ">=0.6.0"

[extras]
CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"
Expand Down
6 changes: 6 additions & 0 deletions src/eventtimes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,9 @@ end

isevent(ev::EventTime) = ev.status
iscensored(ev::EventTime) = !ev.status

## StatsModels compatibility

StatsModels.concrete_term(t::Term, xs::AbstractVector{<:EventTime}, ::Nothing) =
StatsModels.ContinuousTerm(t.sym, first(xs), first(xs), first(xs), first(xs))
Base.copy(et::EventTime) = et

0 comments on commit f5ab838

Please sign in to comment.