tsdecomp {tsModel} | R Documentation |
Time scale decomposition
Description
Decompose a vector into frequency components
Usage
tsdecomp(x, breaks)
Arguments
x |
a numeric vector with no missing data |
breaks |
a numeric constant or a vector of break points into which
|
Value
A matrix with dimension n x m where n is the length of x
and m
is the number of break categories.
Author(s)
Original by Aidan McDermott; revised by Roger Peng rpeng@jhsph.edu
References
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.
Examples
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.
[Package tsModel version 0.6-2 Index]