spec.lomb: The Lomb periodogram for unevenly sampled data

Description Usage Arguments Details Value References Examples

Description

The function to estimate the Lomb periodogram for a spectral analysis of unevenly sampled data.

Usage

1
spec.lomb(y = stop("no data arg"), x = stop("no time arg"), freq = NULL)

Arguments

y

vector of length n representing the unevenly sampled time series.

x

the a vector (of length n) representing the times of observation.

freq

the frequencies at which the periodogram is to be calculated. If NULL the canonical frequencies (the Fourier frequencies) are used.

Details

This is the Lomb periodogram to test for periodicity in time series of unevenly sampled data.

Missing values should be deleted in both x and y before execution.

Value

An object of class "lomb" is returned consisting of the following components:

freq

the frequencies as supplied.

spec

the estimated amplitudes at the different frequencies.

f.max

the frequency of maximum amplitude.

per.max

the corresponding period of maximum amplitude.

p

the level of significance associated with the max period.

References

Lomb, N.R. (1976) Least-squares frequency-analysis of unequally spaced data. Astrophysics and Space Science 39, 447-462.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
   data(plodia)

    y <- sqrt(plodia)
    x <- 1:length(y) 

    #make some missing values
    y[10:19] <- NA; x[10:19] <- NA 
    #omit NAs
    y <- na.omit(y); x <- na.omit(x) 

    #the lomb p'gram
    fit <- spec.lomb(y, x) 
    summary(fit)
    ## Not run: plot(fit)

nlts documentation built on May 1, 2019, 8:44 p.m.

Related to spec.lomb in nlts...