Package 'xsp'

Title: The Chi-Square Periodogram
Description: The circadian period of a time series data is predicted and the statistical significance of the periodicity are calculated using the chi-square periodogram.
Authors: Hitoshi Iuchi, Rikuhiro G. Yamada
Maintainer: Hitoshi Iuchi <[email protected]>
License: MIT + file LICENSE
Version: 0.1.2
Built: 2025-01-22 06:43:42 UTC
Source: CRAN

Help Index


calculate Qp

Description

calculate Qp

Usage

calcQp(values, varPer)

Arguments

values

activity values (each value represents the measured activity in a minute)

varPer

a period at which the chi-squared statistics is to be calculated

Value

a numeric of the calculated chi-squared statistics at the given varPer


Calculate chi-square periodogram

Description

Calculate chi-square periodogram

Usage

chiSqPeriodogram(activityDF, res = 0.1)

Arguments

activityDF

data frame containing time and activity values

res

time resolution for calculating chi-squared statistics

Value

data frame of two columns (dateTime (min), Qp value)


Draw a graph of chi-square periodogram

Description

Draw a graph of chi-square periodogram

Usage

chiSqPeriodogramPlot(chiSqPrdgmDF)

Arguments

chiSqPrdgmDF

data frame containing three column (testPerVec, Qp.act, Qp.sig)

Value

ggplot object

Examples

oscillation <- sin(seq(0, 2 * pi * 10, by = 2 * pi / 1440))
oscillation.df <- data.frame(dateTime = 1:length(oscillation), value = oscillation)
chiSqPeriodogramPlot(chiSqPeriodogram(oscillation.df))

find the peak value from chi-squared periodogram

Description

find the peak value from chi-squared periodogram

Usage

getPeak(x, y, z, p)

Arguments

x

times at which each chi-squared statistics is calculated

y

chi-squared statistics calculated from an activity data

z

chi-squared statistics calculated from a null-hypothesis

p

number of points to be used for fitting a quadratic function

Value

data frame with five numerics