RAR_Spectrum_plot: Plotting Power Spectrum of Residuals

View source: R/RAR_Spectrum_plot.r

RAR_Spectrum_plotR Documentation

Plotting Power Spectrum of Residuals

Description

This function plots the estimated and smoothed power spectrum generated from RAR_Spectrum().

Usage

RAR_Spectrum_plot(rar_spectrum, id_vals = NULL)

Arguments

rar_spectrum

default output from RAR_Spectrum().

id_vals

character vector to print plots for each participant specified. Default is NULL.

Author(s)

Haoyi Fu, Jessica Graves

Examples

data(age_wise)
d <- age_wise[age_wise$id==1,]
rar_ex <- RAR(d, act, date_time)
spec <- RAR_Spectrum(rar_ex)
RAR_Spectrum_plot(spec)

# Multiple subjects
d4 <- age_wise[age_wise$id %in% c(1:4), ]
rar_ex4 <- RAR(d4, act, date_time, id_column=id)
spec4 <- RAR_Spectrum(rar_ex4, id_column=id)
RAR_Spectrum_plot(spec4, id_vals=c("1", "2")) # log scale, ids 1 and 2

JessLGraves/RAR documentation built on April 5, 2025, 3:42 p.m.