Skip to content

Commit

Permalink
tweak docs
Browse files Browse the repository at this point in the history
  • Loading branch information
seabbs committed Mar 14, 2024
1 parent 50c5673 commit 030193f
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions EpiAware/src/EpiLatentModels/autoregressive.jl
Original file line number Diff line number Diff line change
@@ -1,22 +1,18 @@
"""
@doc raw"
The autoregressive (AR) model struct.
# Fields
- `damp_prior::D`: The prior distribution for the damping factor.
- `std_prior::S`: The prior distribution for the standard deviation.
- `init_prior::I`: The prior distribution for the initial values.
"""
"
@with_kw struct AR{D <: Priors, S <: Distribution, I <: Priors} <: AbstractLatentModel
damp_prior::D = truncated(Normal(0.0, 0.05), 0.0, 1)
std_prior::S = truncated(Normal(0.0, 0.05), 0.0, Inf)
init_prior::I = Normal()
@assert length(damp_prior)==length(init_prior) "damp_prior and init_prior must have the same length"
end

"""
@doc raw"
Generate a latent AR series.
# Arguments
- `latent_model::AR`: The AR model.
- `n::Int`: The length of the AR series.
Expand All @@ -27,7 +23,7 @@ Generate a latent AR series.
# Notes
- The length of `damp_prior` and `init_prior` must be the same.
- `n` must be longer than the order of the autoregressive process.
"""
"
@model function generate_latent(latent_model::AR, n)
p = length(latent_model.damp_prior)
ϵ_t ~ MvNormal(ones(n - p))
Expand Down

0 comments on commit 030193f

Please sign in to comment.