memCoef | R Documentation |
Calculates the Burg-algorithm coefficients for MEM spectral estimation
memCoef(.data, .poles = NA)
.data |
Numeric vector of data points. Often this should first have mean and trend removed, e.g., using detrend() provided here, but that should be performed using a data.frame that includes a 'Time' variable as the first variable. The numeric vector .data then can be the output from that function. |
.poles |
Number of poles to use in the calculation. A small number produces a smooth spectrum, which a large number is needed for high-resolution features. A reasonable number (and the default) is 5% of the length of the .data vector. Values comparable to the length of the .data vector can take an awkwardly long time. |
The resulting coefficients can be used as input to memEstimate to calculate the variance spectrum. The full output list as returned from this function should be provided to memEstimate.
A list with these components: [[1]] .poles As used in the calculation [[2]] cf0 The mean-square discrepancy [[3]] cf Numeric vector of coefficients, length=.poles
William Cooper
p. 568, Numerical Recipes in C, Second Edition, Press et al. (but here coded independently in R, following the algorithm specified there)
S <- memCoef(RAFdata[, 'TASX'])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.