infermsmetrop {HKprocess} | R Documentation |
Bayesian inference for μ and σ^2 for the HKp.
Description
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.
Usage
infermsmetrop(Hbayes, data)
Arguments
data |
time series data |
Hbayes |
Hurst parameter simulation sample, should be a vector |
Value
A matrix with two columns, the first corresponding to the sample of μ and the second corresponding to the sample of σ^2.
Author(s)
Hristos Tyralis
References
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.
Examples
# 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)))
[Package HKprocess version 0.1-1 Index]