inferH: Posterior distribution of the H parameter of the HKp using an...

Description Usage Arguments Value Author(s) References Examples

View source: R/inferH.R

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).

Usage

1
inferH(data,n,add = 0.001,minu = 0.001,maxu = 0.999)

Arguments

data

time series data

n

The size of the simulated sample

add

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 Dynamics 42(11-12), 2867–2883. http://dx.doi.org/10.1007/s00382-013-1804-y.

Examples

1
2
3
4
5
6
7
# 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")

HKprocess documentation built on May 29, 2017, 9:20 p.m.

Related to inferH in HKprocess...