Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
sunxd3 committed May 3, 2024
1 parent fbc419a commit b8ba6ab
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
3 changes: 3 additions & 0 deletions src/BUGSExamples/BUGSExamples.jl
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ function load_example_volume(volume_num::Int)
include("Volume_2/05_Eyes.jl")
include("Volume_2/10_BiRats.jl")
vol_2 = (
dugongs = dugongs,
orange_trees = orange_trees,
orange_trees_multivariate = orange_trees_multivariate,
birats = birats,
eyes = eyes
)
Expand Down
8 changes: 4 additions & 4 deletions src/BUGSExamples/Volume_2/01_Dugongs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ name = "Dugongs: nonlinear growth curve"
model_def = @bugs begin
for i in 1:N
Y[i] ~ dnorm(mu[i], tau)
mu[i] < -alpha - beta * pow(gamma, x[i])
mu[i] = alpha - beta * pow(gamma, x[i])
end
alpha ~ dunif(0, 100)
beta ~ dunif(0, 100)
gamma ~ dunif(0.5, 1.0)
tau ~ dgamma(0.001, 0.001)
sigma < -1 / sqrt(tau)
U3 < -logit(gamma)
sigma = 1 / sqrt(tau)
U3 = logit(gamma)
end

original = """
Expand Down Expand Up @@ -48,5 +48,5 @@ reference_results = (
sigma = (mean = 0.09917, std = 0.01503)
)

dugong = Example(
dugongs = Example(
name, model_def, original, data, inits, inits_alternative, reference_results)
4 changes: 2 additions & 2 deletions src/BUGSExamples/Volume_2/02_Orange_trees.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ model_def = @bugs begin
end
end
tauC ~ dgamma(1.0E-3, 1.0E-3)
sigma.C < -1 / sqrt(tauC)
var"sigma.C" = 1 / sqrt(tauC)
for k in 1:3
mu[k] ~ dnorm(0, 1.0E-4)
tau[k] ~ dgamma(1.0E-3, 1.0E-3)
Expand Down Expand Up @@ -89,5 +89,5 @@ reference_results = (
quantile_97_5 = 10.68, n_eff = 5001, Rhat = 20000)
)

orange_tree = Example(
orange_trees = Example(
name, model_def, original, data, inits, inits_alternative, reference_results)
2 changes: 1 addition & 1 deletion src/BUGSExamples/Volume_2/03_Multivariate_Orange_trees.jl
Original file line number Diff line number Diff line change
Expand Up @@ -97,5 +97,5 @@ reference_results = (
quantile_2_5 = 5.947, quantile_97_5 = 10.66, n_eff = 5001, Rhat = 20000)
)

orange_tree_multivariate = Example(
orange_trees_multivariate = Example(
name, model_def, original, data, inits, inits_alternative, reference_results)

0 comments on commit b8ba6ab

Please sign in to comment.