R: Posterior distribution of the H parameter of the HKp using an...
inferH
R Documentation
Posterior distribution of the H parameter of the HKp using an Accept-Reject
algorithm.
Description
The function inferH is used to create a sample from the posterior distribution
of H. The function uses the eq.10 (Tyralis and Koutsoyiannis 2014) to make
inference on H and an Accept-Reject algorithm (see Robert and Casella 2004,
Algorithm A.4).
A number added to the maximum value of the natural logarithm of
eq.10, to avoid bugs of the Accept-Reject algorithm due to computation errors
minu
A lower bound to the parameter H
maxu
An upper bound to the parameter H
Value
Vector with the simulated sample.
Author(s)
Hristos Tyralis
References
Robert C.P., Casella G. (2004) Monte Carlo Statistical Methods, New York:
Springer.
Tyralis H., Koutsoyiannis, D. (2014) A Bayesian statistical model for deriving
the predictive distribution of hydroclimatic variables,
Climate Dynamics42(11-12), 2867–2883.
http://dx.doi.org/10.1007/s00382-013-1804-y.
Examples
# Posterior distribution of the H parameter of the HKp for the Nile time series.
set.seed(12345)
samp.sim <- inferH(Nile,500)
hist(samp.sim,breaks = 20,main = "Histogram of H",xlab = "H")
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(HKprocess)
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/HKprocess/inferH.Rd_%03d_medium.png", width=480, height=480)
> ### Name: inferH
> ### Title: Posterior distribution of the H parameter of the HKp using an
> ### Accept-Reject algorithm.
> ### Aliases: inferH
> ### Keywords: models
>
> ### ** Examples
>
> # Posterior distribution of the H parameter of the HKp for the Nile time series.
>
> set.seed(12345)
>
> samp.sim <- inferH(Nile,500)
>
> hist(samp.sim,breaks = 20,main = "Histogram of H",xlab = "H")
>
>
>
>
>
> dev.off()
null device
1
>