tuls: Spectral analysis of time-uncertain time series using...

Description Usage Arguments References See Also Examples

View source: R/a_tuls.r

Description

tuls computes multiple power estimates using the Lomb-Scargle algorithm and simulated realizations of uncorrelated timings of observations. Timings are simulated with normal distribution ti~N(ti.mu,ti.sd), and sorted in ascending order to ensure non-overlapping feature of observations.

Usage

1
tuls(y, ti.mu, ti.sd, n.sim = 1000, ...)

Arguments

y

A vector of observations.

ti.mu

A vector of estimates of timings of observations.

ti.sd

A vector of standard deviations of timings.

n.sim

A number of simulations.

...

list of optional parameters:
- oversamlping parameter: the default value of ofac=4.
- confidence interval: the default value is CI=0.99.
- number of simulations: the default vale set to n.sim=1000.

References

https://en.wikipedia.org/wiki/Least-squares_spectral_analysis

See Also

https://CRAN.R-project.org/package=Bchron

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
#1. Import or simulate the data (a simulation is chosen for illustrative purposes):
DATA=simtuts(N=50,Harmonics=c(4,0,0), sin.ampl=c(10,0, 0), cos.ampl=c(0,0,0),
            trend=0,y.sd=2, ti.sd=0.2)
y=DATA$observed$y.obs
ti.mu=DATA$observed$ti.obs.tnorm
ti.sd= rep(0.2, length(ti.mu))

#2. Run multiple Lomb-Scargle periodograms (optional parameters are listed in brackets):
TULS=tuls(y=y,ti.mu=ti.mu,ti.sd=ti.sd,n.sim=500)     # (ofac, CI).

#3. Plot the Lomb-Scargle periodograms:
plot(TULS)

#4. Obtain list of frequencies for which spectral power exceeds confidence interval:
summary(TULS)

tuts documentation built on May 1, 2019, 7:56 p.m.

Related to tuls in tuts...