Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a"
RateTables = "d40fb65e-c2ee-4113-9e14-cb96ca0acb32"
StatsAPI = "82ae8749-77ed-4fe6-ae5f-f523153014b0"
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
Expand All @@ -19,8 +20,8 @@ CSV = "0.10"
DataFrames = "1"
Distributions = "0.25"
LinearAlgebra = "1.6"
RateTables = "0.1"
RCall = "0.14"
RateTables = "0.1"
StatsAPI = "1"
StatsBase = "0.34"
StatsModels = "0.7"
Expand Down
18 changes: 17 additions & 1 deletion src/NetSurvival.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module NetSurvival

using PrecompileTools: @setup_workload, @compile_workload # this is a small dependency
using DataFrames
using Distributions
using LinearAlgebra
Expand Down Expand Up @@ -32,4 +32,20 @@ export Surv, Strata
export colrec
export @formula

@setup_workload begin
# Putting some things in `@setup_workload` instead of `@compile_workload` can reduce the size of the
# precompile file and potentially make loading faster.
@compile_workload begin
fit(PoharPerme, @formula(Surv(time,status)~1), colrec, slopop)
fit(PoharPerme, @formula(Surv(time,status)~sex), colrec, slopop)
fit(EdererI, @formula(Surv(time,status)~1), colrec, slopop)
fit(EdererII, @formula(Surv(time,status)~1), colrec, slopop)
fit(Hakulinen, @formula(Surv(time,status)~1), colrec, slopop)
fit(GraffeoTest, @formula(Surv(time,status)~sex), colrec, slopop)
fit(GraffeoTest, @formula(Surv(time,status)~sex+Strata(stage)), colrec, slopop)
fit(CrudeMortality, @formula(Surv(time,status)~1), colrec, slopop)
end
end


end