Skip to content

Commit

Permalink
change Figure 1
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoEgidi committed Jun 12, 2024
1 parent 2f73e87 commit eeec6ae
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
Binary file added paper/fish_hist.pdf
Binary file not shown.
Binary file removed paper/fish_hist.png
Binary file not shown.
4 changes: 2 additions & 2 deletions paper/paper.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ cat(res_stan$model)
```


![Histograms of the Fishery data. The blue line represents the estimated kernel density. \label{fig:example1}](fish_hist.png)
![Histograms of the Fishery data. The blue line represents the estimated kernel density. \label{fig:example1}](fish_hist.pdf){width=70%}


\autoref{fig:example2} displays the traceplots for the parameters $(\mu, \sigma, \eta)$. From the first row
Expand All @@ -151,7 +151,7 @@ and reorder the means $\mu_j$ and the weights $\eta_j$, for $j=1,\ldots,k$, as e

![Fishery dataset: traceplots of the parameters $(\mu, \sigma, \eta)$ obtained via the `rjags` option for the
`piv_MCMC` function (Gibbs sampling, 15000 MCMC iterations). Top row: Raw MCMC outputs.
Bottom row: relabelled MCMC samples. \label{fig:example2}](fish_chains.pdf){width=70%}
Bottom row: relabelled MCMC samples. \label{fig:example2}](fish_chains.pdf){width=80%}



Expand Down
10 changes: 10 additions & 0 deletions paper/rcode/reproducible_code.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,16 @@ y <- fish[,1]
k <- 5
nMC <- 15000

## Figure 1

pdf(file="fishery_hist.pdf", width=10, height=6.5)
par( mar=c(5,4,2,1))
hist(y, breaks=40, prob = TRUE, cex.lab=1.6,
main ="Fishery data", cex.main =1.7,
col="navajowhite1", border="navajowhite1")
lines(density(y), lty=1, lwd=3, col="blue")
dev.off()

#fit the mixture model for univariate data and find the pivots
res <- piv_MCMC(y = y, k = k, nMC = nMC, burn = 0.5*nMC, software = "rjags")

Expand Down

0 comments on commit eeec6ae

Please sign in to comment.