spec.pgram(bats) | R Documentation |
spec.pgram
calculates the periodogram using a fast Fourier
transform, and optionally smooths the result with a series of modified
Daniell smoothers (moving averages giving half weight to the end values).
spec.pgram(x, spans=1, taper=0.1, demean=FALSE, detrend=TRUE, pad=0, plot=FALSE)
x |
A time series. |
spans |
Vector of odd integers giving the widths of modified Daniell smoothers to be used to smooth the periodogram. |
taper |
Proportion of data to taper. A split cosine bell taper is applied to this proportion of the data at the beginning and end of the series. |
demean |
logical. If TRUE , subtract the mean of the series. |
detrend |
logical. If TRUE , remove a linear trend from the
series. This will also remove the mean. |
pad |
Proportion of data to pad. Zeros are added to the end of
the series to increase its length by the proportion pad . |
plot |
Plot the periodogram. |
The raw periodogram is not a consistent estimator of the spectral density, but adjacent values are asymptotically independent. Hence a consistent estimator can be derived by smoothing the raw periodogram, assuming that the spectral density is smooth.
spec
with the following additional
list elements.
spans |
The spans argument. Values which are not odd
integers are converted to the next highest odd integer. |
filter |
The convolution of the modified Daniell smoothers which is used to smooth the raw periodogram. |
df |
The distribution of the spectral density estimate can
be approximated by a chi square distribution with df
degrees of freedom. |
bandwidth |
|
taper |
The value of the taper argument |
pad |
The value of the pad argument |
detrend |
The value of the detrend argument |
demean |
The value of the demean argument |
The series will be automatically padded with zeros until the
series length is a highly composite number in order to help the Fast
Fourier Transform. This is done automatically and is not controlled by
the pad
argument.
Martyn Plummer