Description Usage Arguments References See Also Examples
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.
1 |
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: |
https://en.wikipedia.org/wiki/Least-squares_spectral_analysis
https://CRAN.R-project.org/package=Bchron
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.