res.time
option.periodogram(data,CTMM=NULL,dt=NULL,res.freq=1,res.time=1,fast=NULL,axes=c("x","y"))# S3 method for periodogram
plot(x,max=FALSE,diagnostic=FALSE,col="black",transparency=0.25,grid=TRUE,...)
telemetry
data object or list of such objects. ctmm
model object for specifying the mean. fast
>0 and the sampling rate is variable.fast=2
.periodogram
.res>1
.plot
.periodogram
) which is a dataframe containing the frequency, f
and the Lomb-Scargle periodogram at that frequency, LSP
.dt
is specified, the median sampling interval is used. This is typically a good assumption for most data, even when there are gaps and this choice corresponds to the discrete Fourier transform (DFT) periodogram for evenly-sampled data.
At default resolution the frequency grid interval is given by 1/(2*(range(data$t)+dt))
and the frequency cutoff is given by 1/(2*dt)
, both in accordance with the DFT periodogram. Increasing res.freq
beyond res.freq=1
will make for a smooth periodogram, but sequential frequencies will be highly correlated. The max=TRUE
option to plot.periodogram
may be useful for res.freq>1
. Increasing res.time
beyond res.time=1
is helpful if there is variability in the sampling rate and fast>0
. If a CTMM
argument is provided, the ML mean will be detrended from the data prior to calculating the periodogram. Otherwise, the sample mean will be detrended. If a list of telemetry
objects are fed into periodogram
, then a mean periodogram
object will be returned with the default dt
and base frequency resolution selected on a worst case basis according to the method described by Péron et al (2016).#Load package and data
library(ctmm)
data(buffalo)
#Extract movement data for a single animal
cilla <- buffalo[[1]]
#Calculate periodogram (fast>0 for a speedy example)
#There is drift in the sampling rate here, necessitating res.time>1 with fast>0
LSP <- periodogram(cilla,fast=2,res.time=2)
#Plot the periodogram
plot(LSP)
Run the code above in your browser using DataLab