Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing the prior for negative binomial observations #123

Merged
merged 7 commits into from
Mar 8, 2024

Conversation

SamuelBrand1
Copy link
Collaborator

This addresses #29 using the link given by @seabbs in that issue.

Main change is here

#Parameters
neg_bin_cluster_factor ~ observation_model.neg_bin_cluster_factor_prior
#Predictive distribution
expected_obs = observation_model.delay_kernel * I_t .+ pos_shift
if ismissing(y_t)
y_t = Vector{Int}(undef, length(expected_obs))
end
for i in eachindex(y_t)
y_t[i] ~ NegativeBinomialMeanClust(
expected_obs[i], neg_bin_cluster_factor^2
)
end

The point is that we want to have a half-normal family prior for a standard deviation. In this case, its the standard deviation of the latent Gamma process implicit in the Negative Binomial definition. All this is based on this classic paper.

I've update the getting started note and the sampler seems happy with this new prior.

Closes #29

@SamuelBrand1 SamuelBrand1 linked an issue Mar 7, 2024 that may be closed by this pull request
@SamuelBrand1 SamuelBrand1 requested review from seabbs and zsusswein March 7, 2024 17:25
@seabbs seabbs enabled auto-merge March 7, 2024 17:30
EpiAware/docs/src/examples/getting_started.jl Show resolved Hide resolved
EpiAware/docs/src/examples/getting_started.jl Outdated Show resolved Hide resolved
@seabbs seabbs merged commit bbeb215 into main Mar 8, 2024
10 checks passed
@seabbs seabbs deleted the 29-sampling-noise-prior branch March 8, 2024 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sampling noise prior
2 participants