# lmSDF: SDF for various stochastic fractal time series models In fractal: A Fractal Time Series Modeling and Analysis Package

## Description

Compute a discretized version of a single-sided parametric spectral density function (SDF) for various stochastic fractal time series models.

## Usage

 ```1 2``` ```lmSDF(x, sampling.interval=1, n.freq=NULL, n.sample=NULL, with.Nyquist=NULL) ```

## Arguments

 `x` an object of class `"lmModel"`. Use the `lmModel` function to create this input. `n.freq` the number of frequencies at which the SDF is computed (this argument should not be supplied if `n.sample` is supplied). If `n.sample` is non-NULL supplied but `n.freq` is NULL, the actual grid of frequencies is determined by the argument with.Nyquist. Default: if neither `n.sample` nor `n.freq` is specified, `n.freq` defaults to 32. `n.sample` length of a time series. If non-NULL, the spectral resolution is set to `1/(n.sample * sampling.interval)`. Default: `NULL` (`n.freq` is used to set the specral resolution instead). `sampling.interval` the sampling interval for the process. The SDF is computed for frequencies on the interval [0, Nyquist] where Nyquist is `1/(2*sampling.interval)`. The value of `sampling.interval` must be a positive number. Default: `1`. `with.Nyquist` a logical flag. If `TRUE`, the grid of frequencies over which the SDF is evaluated ranges from 1/2*n.freq*sampling.interval up to the Nyquist frequency; otherwise, the range is from 1/(2*n.freq + 1)*sampling.interval to just below the Nyquist frequency. The intent of this argument is to mimic the grid of Fourier frequencies for time series with an even or odd sample size by setting with.Nyquist to, respectively, `TRUE` or `FALSE`. This argument is only really intended to be used if `n.sample` is not supplied, but `n.freq` is. Default: `TRUE`.

## Details

The SDF is computed as described in Section 7.6 of Percival and Walden (2000), after a possible change of variable to take into account the sampling interval (the discussion in the reference assumes a unit sampling interval).

## Value

an object of class `signalSeries` containing the SDF.

## References

D. Percival and A. Walden (2000), Wavelet Methods for Time Series Analysis, Cambridge University Press, Chapter 7.

J. Beran (1994), Statistics for Long-Memory Processes, Chapman and Hall, Chapter 2.

D. Percival and A. Walden (1993), Spectral Analysis for Physical Applications, Cambridge University Press, 1993, Chapter 9.

`lmModel`, `lmACF`, `lmSimulate`.

## Examples

 ```1 2 3 4 5 6 7 8``` ```old.plt <- par("plt") models <- c("ppl","fdp","fgn","dfbm") for (i in seq(along=models)){ splitplot(2,2,i) plot(lmSDF(lmModel(models[i])), reference.grid=FALSE, log.axes="xy") } par(plt=old.plt) ```

### Example output

```Loading required package: splus2R