psd: Power spectrum analaysis for time series

Description Usage Arguments Value Author(s) Examples

View source: R/analysis.R

Description

Take time series data and perform power specturm analysis. Through FFT, it lists up the most probable periods for seasonal term. Up to 10 most likely suggestions will be printed out to the console based on estimated PSD(Power Spectrum Density).

Usage

1

Arguments

data

Time series data or list of them to be plotted. The data should be either ts object or numeric vector.

plot

If TRUE, the plot of estimated PSD will be presented. Otherwise, not. (default = TRUE)

Value

A list containing the following elements:

period Data frame holding suggested periods and corresponding PSD. Ordered by PSD.
plot ggplot object of the plot. (Returned only if plot is TRUE.)

Author(s)

Sanghyun Park, Daun Jeong, and Sehun Kim

Examples

1
2
3
# 228 is the station code for SNU
data <- get.subway(228)
psd(data$total)

eik4862/Subway documentation built on Sept. 24, 2021, 3:39 a.m.