tsdecomp | R Documentation |
Decompose a vector into frequency components
tsdecomp(x, breaks)
x |
a numeric vector with no missing data |
breaks |
a numeric constant or a vector of break points into which |
A matrix with dimension n x m where n is the length of x
and m is the number of break categories.
Original by Aidan McDermott; revised by Roger Peng rpeng@jhsph.edu
Dominici FD, McDermott A, Zeger SL, Samet JM (2003). “Airborne particulate matter and mortality: Timescale effects in four US cities”, American Journal of Epidemiology, 157 (12), 1055–1065.
x <- rnorm(101) freq.x <- tsdecomp(x, c(1, 10, 30, 80)) ## decompose x into 3 frequency categories. ## x[,1] represents from 1 to 9 cycles in 101 data points ## x[,2] represents from 10 to 29 cycles in 101 data points ## x[,3] represents from 30 to 50 cycles in 101 data points ## you can only have up to 50 cycles in 101 data points.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.