Spectrum Plot Dialog Function

DESCRIPTION:

This function is used by the Spectrum Plot dialog.

USAGE:

menuSpectrum(data, variable, subset, na.omit.p=T, method="pgram", 
     spans=1, pad=0, taper=0.1, detrend=T, demean=F, 
     n.freq=as.integer(length(x)/2 + 1), frequency=1) 

REQUIRED ARGUMENTS:

data
data set of interest.
variable
variable of interest.

OPTIONAL ARGUMENTS:

subset
subset expression for rows.
na.omit.p
logical indicating whether to omit rows with missing values.
method
either the string "Autoregressive" or "Periodogram" depending on whether an autoregressive model or a smoothed periodogram is to be used in estimating the spectrum.
spans
a sequence of lengths of modified Daniell smoothers to run over the raw periodogram. Use spans = 1, the default, for the raw periodogram. A modified Daniell smoother has all values equal except for the 2 end values which are half the size of the others. The values should be odd integers. Used when method="Autoregressive".
pad
fraction of the length of x that is to be padded: `{pad * length(x)}' zeros are added to the end of the series before computing the periodogram. Used when method="Autoregressive".
taper
fraction of each end of the time series that is to be tapered. A split cosine taper is applied to `{taper * length(x)}' points at each end of series. This must take values between 0 and 0.5. Used when method="Autoregressive".
detrend
if TRUE, remove a least squares line from each component of the series before computing periodogram. Used when method="Autoregressive".
demean
if TRUE, remove the mean of each series before computing the periodogram (detrend also removes the mean). Used when method="Autoregressive".
n.freq
the number of frequencies between 0 and the Nyquist frequency ( =frequency/2 cycles per unit time) at which to compute the spectrum. The default value is n.used/2+1, where n.used is the number of observations not missing in the original time series. Used when method="Periodogram".
frequency
the sampling frequency for the time series. Used when method="Periodogram".

VALUE:

a list as described in the help file for spectrum.

SEE ALSO:

, , .