Description Usage Arguments Details Author(s) References Examples
Returns theoretical spectral density evaluated in ARMA and ARFIMA processes.
1 
ar, ma 
AR or MA vector, respectively. If the time serie doesn't have AR (or MA) term then omit it. To more details see examples. 
d 

sd 
Noise scale factor, by default is 1. 
lambda 
λ parameter on which the spectral density is calculated/computed. If 
The spectral density of an ARFIMA(p,d,q) processes is
f(λ) = \frac{σ^2}{2π} \cdot \bigg(2\, \textmd{sin}(λ/2)\bigg)^{2d} \cdot \frac{\biggθ\bigg(\textmd{exp}\bigg(iλ\bigg)\bigg)\bigg^2}{\biggφ\bigg(\textmd{exp}\bigg(iλ\bigg)\bigg)\bigg^2}
with π ≤ λ ≤ π and 1 < d < 1/2. x is the Mod
of x. fdensity
returns the values corresponding to f(λ). When d
is zero, the spectral density corresponds to an ARMA(p,q).
Ricardo Olea <[email protected]>
Brockwell, Peter J., and Richard A. Davis. Introduction to time series and forecasting. 2002. ISBN13: 9780387953519.
Palma W. LongMemory Time Series. Theory and Methods. 1st ed. New Jersey: John Wiley & Sons, Inc.; 2007. 285 p.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26  ## Example 1: Spectral Density AR(1)
lambda = seq(0,pi,0.01)
f = fdensity(ar = 0.5, lambda = lambda)
plot(f~lambda, bty = "n", type = "l", las = 1, xlab = expression("Frequency"),
ylab = expression("Spectral Density"))
## Example 2: Spectral Density AR(2)
lambda = seq(0,pi,0.01)
f = fdensity(ar = c(1.3,0.6), lambda = lambda, sd=10)
plot(f~lambda, bty = "n", type = "l", las = 1, xlab = expression("Frequency"),
ylab = expression("Spectral Density"))
## Spectral Density ARMA(1,1)
lambda = seq(0,pi,0.01)
f = fdensity(ar = 0.5, ma = 0.8, lambda = lambda)
plot(f~lambda, bty = "n", type = "l", las = 1, xlab = expression("Frequency"),
ylab = expression("Spectral Density"))
## Spectral Density ARFIMA(1,d,1)
lambda = seq(0,pi,0.01)
f = fdensity(ar = 0.5, ma = 0.8, d = 0.2, lambda = lambda)
plot(f~lambda, bty = "n", type = "l", las = 1, xlab = expression("Frequency"),
ylab = expression("Spectral Density"))

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.