compute.Hprior: Penalise complexity prior for the Hurst exponent

View source: R/compute.Hprior.R

compute.HpriorR Documentation

Penalise complexity prior for the Hurst exponent

Description

Computes a penalise complexity prior function for the Hurst exponent in logarithmic scaling. Both fGn and ARFIMA(0,d,0) models are supported.

Usage

compute.Hprior(n, upper, alpha, persistent=TRUE, model="fgn")

Arguments

n

Length of the time series for which the prior is applied. Increasing this will theoretically improve the accuracy of the prior, but will be more costly to perform. Experiments have suggested that the prior is rather invariant of this parameter.

upper

The value of the penalise complexity parameter upper.

alpha

The value of the penalise complexity parameter alpha. This also denotes the probability that the Hurst exponent exceeds upper.

persistent

A boolean variable. If TRUE, the PC-prior will be created for only the persistent range 0.5<H<1.

model

Determines which model the Hurst exponent belongs to. Currently, only fractional Gaussian noise (model="fgn") and ARFIMA(0,d,0) (model="arfima", d=H-0.5) models are supported.

Details

The PC-prior parameters shape the density as the probability of the Hurst exponent exceeding upper is equal to alpha.

Value

Returns the PC-prior in logarithmic scaling as a function.

Author(s)

Eirik Myrvoll-Nilsen eirik.myrvoll-nilsen@uit.no

References

Sørbye, S., Rue, H. (2017) Fractional Gaussian noise: Prior specification and model comparison. Environmetrics, 29(5-6)

See Also

inla.climate

Examples

HH = seq(0.501,0.999,by=0.0001)
l.HH = log((HH-0.5)/(1-HH))

l.pcp.f = compute.Hprior(100,0.9,0.01,persistent=TRUE,model="fgn")
pcp = 0.5+0.5/(1+exp(-l.pcp.f(l.HH)))

plot(x=HH,y=pcp,type="l",xlab="H",ylab="Density")

eirikmn/INLA.climate documentation built on Feb. 6, 2023, 11:41 a.m.