Skip to content

Commit

Permalink
change to jldoctest
Browse files Browse the repository at this point in the history
  • Loading branch information
SamuelBrand1 committed Nov 15, 2024
1 parent 149fb0d commit 9e6df0a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
12 changes: 10 additions & 2 deletions EpiAware/src/EpiLatentModels/odemodels/SEIRParams.jl
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ population that is exposed, `I` is the proportion of the population that is infe
the proportion of the population that is recovered. The parameters are the infectiousness `β`,
the incubation rate `α` and the recovery rate `γ`.
```julia
```jldoctest; output = false
using EpiAware, OrdinaryDiffEq, Distributions
# Create an instance of SIRParams
Expand All @@ -81,6 +81,10 @@ seirparams = SEIRParams(
recovery_rate = LogNormal(log(0.1), 0.05),
initial_prop_infected = Beta(1, 99)
)
nothing
# output
```
"""
struct SEIRParams{
Expand Down Expand Up @@ -136,7 +140,7 @@ reason for this is that these are the equilibrium proportions in a constant inci
# Example
```julia
```jldoctest; output = false
using EpiAware, OrdinaryDiffEq, Distributions
# Create an instance of SIRParams
Expand All @@ -152,6 +156,10 @@ seirparam_mdl = generate_latent(seirparams, nothing)
# Sample the parameters of SEIR model
sampled_params = rand(seirparam_mdl)
nothing
# output
```
# Returns
Expand Down
12 changes: 10 additions & 2 deletions EpiAware/src/EpiLatentModels/odemodels/SIRParams.jl
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ parameters are the infectiousness `β` and the recovery rate `γ`.
# Example
```julia
```jldoctest; output = false
using EpiAware, OrdinaryDiffEq, Distributions
# Create an instance of SIRParams
Expand All @@ -77,6 +77,10 @@ sirparams = SIRParams(
recovery_rate = LogNormal(log(0.1), 0.05),
initial_prop_infected = Beta(1, 99)
)
nothing
# output
```
"""
struct SIRParams{P <: ODEProblem, D <: Sampleable, E <: Sampleable, F <: Sampleable} <:
Expand Down Expand Up @@ -118,7 +122,7 @@ parameters are the infectiousness `β` and the recovery rate `γ`.
# Example
```julia
```jldoctest; output = false
using EpiAware, OrdinaryDiffEq, Distributions
# Create an instance of SIRParams
Expand All @@ -133,6 +137,10 @@ sirparam_mdl = generate_latent(sirparams, nothing)
#sample the parameters of SIR model
sampled_params = rand(sirparam_mdl)
nothing
# output
```
# Returns
Expand Down

0 comments on commit 9e6df0a

Please sign in to comment.