View source: R/compute.Hprior.R
compute.Hprior | R Documentation |
Computes a penalise complexity prior function for the Hurst exponent in logarithmic scaling. Both fGn and ARFIMA(0,d,0) models are supported.
compute.Hprior(n, upper, alpha, persistent=TRUE, model="fgn")
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 |
alpha |
The value of the penalise complexity parameter |
persistent |
A boolean variable. If |
model |
Determines which model the Hurst exponent belongs to. Currently, only fractional Gaussian noise ( |
The PC-prior parameters shape the density as the probability of the Hurst exponent exceeding upper
is equal to alpha
.
Returns the PC-prior in logarithmic scaling as a function.
Eirik Myrvoll-Nilsen eirik.myrvoll-nilsen@uit.no
Sørbye, S., Rue, H. (2017) Fractional Gaussian noise: Prior specification and model comparison. Environmetrics, 29(5-6)
inla.climate
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.