View source: R/infermsmetrop.R
infermsmetrop | R Documentation |
The function infermsmetrop is used to create a sample from the posterior distribution of μ and σ^2, using eqs. 8,9 in Tyralis and Koutsoyiannis (2014) for the HKp.
infermsmetrop(Hbayes, data)
data |
time series data |
Hbayes |
Hurst parameter simulation sample, should be a vector |
A matrix with two columns, the first corresponding to the sample of μ and the second corresponding to the sample of σ^2.
Hristos Tyralis
Tyralis H, Koutsoyiannis D (2014) A Bayesian statistical model for deriving the predictive distribution of hydroclimatic variables. Climate Dynamics 42(11-12):2867–2883. doi: 10.1007/s00382-013-1804-y.
# Posterior distributions of the mu and sigma parameters of the HKp for the Nile # time series. set.seed(12345) samp.sim1 <- inferH(Nile, 500) samp.sim2 <- infermsmetrop(samp.sim1, Nile) hist(samp.sim2[,1], breaks = 20, main = expression(paste("Histogram of ",mu)), xlab = expression(paste(mu))) hist(sqrt(samp.sim2[,2]), breaks = 20, main = expression(paste("Histogram of ",sigma)), xlab = expression(paste(sigma)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.