an overview of psd: adaptive sine multitaper power ... · pdf filean overview of psd: adaptive...

29
An overview of psd: Adaptive sine multitaper power spectral density estimation in R Andrew J. Barbour and Robert L. Parker March 18, 2015 Abstract This vignette provides an overview of some features included in the package psd, designed to compute estimates of power spectral density (PSD) for a univariate series in a sophisticated manner, with very little tuning eort. The sine multitapers are used, and the number of tapers varies with spectral shape, according to the optimal value proposed by Riedel and Sidorenko (1995). The adaptive procedure iteratively refines the optimal number of tapers at each frequency based on the spectrum from the previous iteration. Assuming the adaptive procedure converges, this produces power spectra with significantly lower spectral variance relative to results from less-sophisticated estimators. Sine tapers exhibit excellent leakage suppression characteristics, so bias eects are also reduced. Resolution and uncertainty vary with the number of tapers, which means we do not need to resort to either (1) windowing methods, which inherently degrade resolution at low-frequency (e.g. Welch’s method); or (2) smoothing kernels, which can badly distort important features without careful tuning (e.g. the Daniell kernel in stats::spectrum). In this regards psd is best suited for data having large dynamic range and some mix of narrow and wide-band structure, features typically found in geophysical datasets. Contents 1 Quick start: A minimal example. 2 2 Comparisons with other methods 5 2.1 stats::spectrum ............................................ 5 2.2 RSEIS::mtapspec ............................................ 7 2.3 multitaper::spec.mtm ........................................ 16 2.4 sapa::SDF ................................................ 16 2.5 bspec::bspec .............................................. 16 3 Can AR prewhitening improve the spectrum? 18 4 Assessing spectral properties 20 4.1 Spectral uncertainties ........................................... 20 4.2 Spectral resolution ............................................ 23 4.3 Visualizing the adaptive history ...................................... 24 5 Call overview 27 1

Upload: hoangkhue

Post on 06-Mar-2018

217 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: An overview of psd: Adaptive sine multitaper power ... · PDF fileAn overview of psd: Adaptive sine multitaper power spectral density estimation in R Andrew J. Barbour and Robert L

An overview of psd: Adaptive sine multitaper power spectraldensity estimation in R

Andrew J. Barbour and Robert L. Parker

March 18, 2015

Abstract

This vignette provides an overview of some features included in the package psd, designed to compute estimatesof power spectral density (PSD) for a univariate series in a sophisticated manner, with very little tuning effort. The sinemultitapers are used, and the number of tapers varies with spectral shape, according to the optimal value proposed byRiedel and Sidorenko (1995). The adaptive procedure iteratively refines the optimal number of tapers at each frequencybased on the spectrum from the previous iteration. Assuming the adaptive procedure converges, this produces powerspectra with significantly lower spectral variance relative to results from less-sophisticated estimators. Sine tapersexhibit excellent leakage suppression characteristics, so bias effects are also reduced. Resolution and uncertaintyvary with the number of tapers, which means we do not need to resort to either (1) windowing methods, whichinherently degrade resolution at low-frequency (e.g. Welch’s method); or (2) smoothing kernels, which can badlydistort important features without careful tuning (e.g. the Daniell kernel in stats::spectrum). In this regards psdis best suited for data having large dynamic range and some mix of narrow and wide-band structure, features typicallyfound in geophysical datasets.

Contents1 Quick start: A minimal example. 2

2 Comparisons with other methods 52.1 stats::spectrum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52.2 RSEIS::mtapspec . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72.3 multitaper::spec.mtm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162.4 sapa::SDF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162.5 bspec::bspec . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

3 Can AR prewhitening improve the spectrum? 18

4 Assessing spectral properties 204.1 Spectral uncertainties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204.2 Spectral resolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234.3 Visualizing the adaptive history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

5 Call overview 27

1

Page 2: An overview of psd: Adaptive sine multitaper power ... · PDF fileAn overview of psd: Adaptive sine multitaper power spectral density estimation in R Andrew J. Barbour and Robert L

1 Quick start: A minimal example.First, we load the package into the namespace:

library(psd)

## Loaded psd (1.0.0) � Adaptive multitaper spectrum estimation

For a series to analyze, we can use magnet, included in psd, which represents along-track measurements of hor-izontal magnetic-field strength from a gimbaled, airborne magnetometer. These data are a small subset of the fullProject MAGNET series (Coleman, 1992), which has provided insight into the history of the Earth’s oceanic crust(Parker and O’Brien, 1997; O’Brien et al., 1999; Korte et al., 2002). The sampling interval is once every kilometer(km), so the data will represent crustal magnetization with wavelengths longer than 2 km.

data(magnet)

The format of the data set is a data.frame with four sets of information:

names(magnet)

## [1] "km" "raw" "clean" "mdiff"

The raw and clean names represent raw and edited intensities respectively, expressed in units of nanotesla; mdiffis the difference between them. The difference between them is a matter of just a few points attributable to instrumentalmalfunction; but, as we will see, the outliers adversely affect the accuracy of any type PSD estimate, regardless of thelevel of sophistication of the method.

subset(magnet, abs(mdiff) > 0)

## km raw clean mdiff## 403 402 209.1 -3.6355 -212.7355## 717 716 -248.7 -9.7775 238.9225

These are readily apparent in the timeseries:

0 500 1000 1500 2000

−200

−100

0

100

200

Along−track distance, km

Mag

netic

ano

mal

y

Raw

Clean (+75)

2

Page 3: An overview of psd: Adaptive sine multitaper power ... · PDF fileAn overview of psd: Adaptive sine multitaper power spectral density estimation in R Andrew J. Barbour and Robert L

We can find power spectral density (PSD) estimates for the two series quite simply with pspectrum:

psdr <- pspectrum(magnet$raw)

## Stage 0 est. (pilot)## environment ** .psdEnv ** refreshed## detrending (and demeaning)## Stage 1 est. (Ave. S.V.R. -13.0 dB)## Stage 2 est. (Ave. S.V.R. -27.2 dB)## Stage 3 est. (Ave. S.V.R. -44.4 dB)## Stage 4 est. (Ave. S.V.R. -47.4 dB)## Stage 5 est. (Ave. S.V.R. -47.1 dB)## Normalized single-sided psd estimates ( psd ) for sampling-freq. 1

psdc <- pspectrum(magnet$clean)

## Stage 0 est. (pilot)## environment ** .psdEnv ** refreshed## detrending (and demeaning)## Stage 1 est. (Ave. S.V.R. -13.1 dB)## Stage 2 est. (Ave. S.V.R. -27.8 dB)## Stage 3 est. (Ave. S.V.R. -44.9 dB)## Stage 4 est. (Ave. S.V.R. -48.9 dB)## Stage 5 est. (Ave. S.V.R. -48.0 dB)## Normalized single-sided psd estimates ( psd ) for sampling-freq. 1

Each application of pspectrum calculates a pilot PSD, followed by niter iterations of refinement. With eachiteration the number of tapers is adjusted based on the proposed optimal number from Riedel and Sidorenko (1995),which depends on spectral shape; we use quadratically weighted spectral derivatives (Prieto et al., 2007) to estimatethis shape. Note that if the user forgets to assign the results of pspectrum to the global environment, the result can berecovered with the psd_envGet function:

psdc_recovered <- psd_envGet("final_psd")all.equal(psdc, psdc_recovered)

## [1] TRUE

In general, spectral variance is reduced with sequential refinements1, but is not necessarily guaranteed to reducemonotonically.

Figure 1 compares power spectra for the raw and clean series produced by stats::spectrum and pspectrum2

using default settings. We expect the Project MAGNET data to be linear in the space of linear-frequencies andlogarithmic-power; in fact there is a clear improvement in spectral shape between the two series, simply becausethe large outliers have been removed. The PSD of the clean series shows the type of spectrum typical of geophysicalprocesses (Agnew, 1992), and a rolloff in signal for 10 kilometer wavelengths and longer; whereas, the PSD for the rawseries looks somewhat unrealistic at shorter wavelengths – features which could be difficult to judge with high spectralvariance.

1 Messages are given by default; ones which read “Ave. S.V.R." are in reference to average spectral-variance reduction, which we define here asthe variance of the double-differenced spectra at each stage, relative to the spectral variance in the pilot estimate.

2 Note that pspectrum returns an object with class spec (and amt), so we have access to methods within stats, including plot.spec.

3

Page 4: An overview of psd: Adaptive sine multitaper power ... · PDF fileAn overview of psd: Adaptive sine multitaper power spectral density estimation in R Andrew J. Barbour and Robert L

0.0 0.1 0.2 0.3 0.4 0.5

0

5

10

15

20

25

30

frequency

spec

trum

(dB

)

Raw and cleaned Project MAGNET power spectral density estimates

bandwidth = 0.000141, 95% C.I. is (−6.26,16.36)dB

Clean

Raw

Figure 1: Power spectral density estimates for the raw and cleaned Project MAGNETdata bundled with psd: see ?magnet. Points are estimates produced by spectrum anddashed lines are estimates produced by pspectrum, using the default settings. Notethat because the objects class includes ‘spec’, we have utilized existing methods inthe stats namespace. The bandwidth and confidence interval estimates are for thespectrum-based result.

4

Page 5: An overview of psd: Adaptive sine multitaper power ... · PDF fileAn overview of psd: Adaptive sine multitaper power spectral density estimation in R Andrew J. Barbour and Robert L

2 Comparisons with other methodsAs we have shown in the Project MAGNET example, a more accurate estimate of the power spectrum can help improveunderstanding of the physics behind the signals in the data. But, assuming a sample is free of non-physical points,how do PSD estimates from psd compare with other methods? Unfortunately the suite of extensions with similarfunctionality is relatively limited, but hopefully we have summarized most, if not all, the available functions in Table1.

Table 1: A comparison of power spectral density estimators in R, excluding extensionswhich only estimate raw-periodograms. Normalizations are shown as either “single" or“double" for either single- or double-sided spectra, and “various" if there are multiple,optional normalizations. A (∗) denotes the default for a function having an option foreither single or double.

Function Namespace Sine m.t.? Adaptive? Norm. Referencebspec bspec No No single∗ Röver et al. (2011)

mtapspec RSEIS Yes No various Lees and Park (1995)pspectrum psd Yes Yes single Barbour and Parker (2014, 2015)spectrum stats No No double R Core Team (2014)spec.mtm multitaper Yes Yes double Rahim et al. (2014)

SDF sapa Yes No single∗ Percival and Walden (1993)

We compare results from psd with those from a few of the methods in Table 1, using the same data: the cleanedProject MAGNET series.

2.1 stats::spectrum

Included in the core distribution of R is stats::spectrum, which accesses stats::spec.ar or stats::spec.pgram(which was used for the estimates in Figure 1) for either parametric and non-parametric estimation, respectively. Theuser can optionally apply a single cosine taper, and/or a smoothing kernel. Our method is non-parametric; hence, wewill compare to the latter.

Included in psdcore is an option to compare the results with cosine-tapered periodogram, found with a commandequivalent to this:

spec.pgram(X, pad = 1, taper = 0.2, detrend = FALSE, demean = FALSE, plot = FALSE)

Within psdcore the comparison is made with the logical argument preproc passed to spec.pgram, which is Trueby default.

As a matter of bookkeeping and good practice, we should consider the working environment accessed by psdfunctions. To ensure psdcore does not access any inappropriate information leftover from the previous calculations,we can set refresh=TRUE; we then re-calculate the multitaper PSD and the raw periodogram with plot=TRUE; theseresults are shown in Figure 2.

5

Page 6: An overview of psd: Adaptive sine multitaper power ... · PDF fileAn overview of psd: Adaptive sine multitaper power spectral density estimation in R Andrew J. Barbour and Robert L

ntap <- psdc[["taper"]] # get the previous vector of taperspsdcore(magnet$clean, ntaper = ntap, refresh = TRUE, plot = TRUE)

−3.0 −2.5 −2.0 −1.5 −1.0 −0.5−20

−10

0

10

20

30

40

dB r

el.

units

δt

spec.pgram (20% cosine taper)psdcore (165 − 262 tapers)

log10 frequency

Spectral density estimates

−3.0 −2.5 −2.0 −1.5 −1.0 −0.5

50

100

150

200

250

taper index

num

ber

of ta

pers

Sine−tapers

units

500 1000 1500 2000

−30

−20

−10

0

10

20

30

Modified even−length series(dem. TRUE detr. TRUE)

time0 5 10 15 20 25 30

0.0

0.2

0.4

0.6

0.8

1.0

Lag

AC

F

lag, time

Auto−correlation function

Sine−multitaper PSD vs. Tapered Periodogram

Figure 2: A summary plot produced by psdcore when plot=TRUE. Top: Comparisonbetween PSD estimators for the cleaned Project MAGNET data. The frequency axisis in units of log10 km−1, and power axis is in decibels. Middle: The number of tapersapplied as a function of frequency from the plot.tapersmethod. Bottom: The spatialseries used to estimate the PSDs and a subset of the full autocorrelation function.

6

Page 7: An overview of psd: Adaptive sine multitaper power ... · PDF fileAn overview of psd: Adaptive sine multitaper power spectral density estimation in R Andrew J. Barbour and Robert L

2.2 RSEIS::mtapspec

In RSEIS the spectrum estimation tool is mtapspec, which calls the program of Lees and Park (1995). There arenumerous optional tuning parameters, including flags for normalization and taper averaging, but for our purpose thecorrect normalization for mtapspec is found by using MTP=list(kind=2, inorm=3) and scaling the results by 2 (toconvert double-sided spectra to single-sided spectra).

We assume mtapspec doesn’t remove a mean and trend from the input series. We can do this easily with theprewhiten methods:

library(RSEIS)dt = 1 # km# prewhiten the data after adding a linear trend + offsetsummary(prewhiten(mc <- ts(magnet$clean + 1000, deltat = dt) + seq_along(magnet$clean),

plot = FALSE))

## detrending (and demeaning)

## Length Class Mode## lmdfit 12 lm list## ardfit 0 -none- NULL## prew_lm 2048 ts numeric## prew_ar 0 -none- NULL## imputed 1 -none- logical

Although the default operation of prewhiten is to fit a linear model of the form f (x) = αx + β + ε using ordinarylinear least squares, setting AR.max higher than zero to fit an auto-regressive (AR) model to the data3. This fit uses theAkaike Infomation Criterion (AIC) to select the highest order appropriate for the data.

summary(atsar <- prewhiten(mc, AR.max = 100, plot = FALSE))

## detrending (and demeaning)## autoregressive model fit (returning innovations)

## Length Class Mode## lmdfit 12 lm list## ardfit 14 ar list## prew_lm 2048 ts numeric## prew_ar 2048 ts numeric## imputed 1 -none- logical

# linear model:str(atsar[["lmdfit"]])

## List of 12## $ coefficients : Named num [1:2] 1000 1## ..- attr(*, "names")= chr [1:2] "(Intercept)" "xr"## $ residuals : Named num [1:2048] -16.23 -14.56 -12.02 -7.21 -3.13 ...## ..- attr(*, "names")= chr [1:2048] "1" "2" "3" "4" ...## $ effects : Named num [1:2048] -91608.19 26761.6 -11.16 -6.35 -2.27 ...## ..- attr(*, "names")= chr [1:2048] "(Intercept)" "xr" "" "" ...

3Note that the linear trend fitting is removed from the series prior to AR estimation, and the residuals from this fit are also returned.

7

Page 8: An overview of psd: Adaptive sine multitaper power ... · PDF fileAn overview of psd: Adaptive sine multitaper power spectral density estimation in R Andrew J. Barbour and Robert L

## $ rank : int 2## $ fitted.values: Named num [1:2048] 1001 1002 1003 1004 1005 ...## ..- attr(*, "names")= chr [1:2048] "1" "2" "3" "4" ...## $ assign : int [1:2] 0 1## $ qr :List of 5## ..$ qr : num [1:2048, 1:2] -45.2548 0.0221 0.0221 0.0221 0.0221 ...## .. ..- attr(*, "dimnames")=List of 2## .. .. ..$ : chr [1:2048] "1" "2" "3" "4" ...## .. .. ..$ : chr [1:2] "(Intercept)" "xr"## .. ..- attr(*, "assign")= int [1:2] 0 1## ..$ qraux: num [1:2] 1.02 1.04## ..$ pivot: int [1:2] 1 2## ..$ tol : num 1e-07## ..$ rank : int 2## ..- attr(*, "class")= chr "qr"## $ df.residual : int 2046## $ xlevels : Named list()## $ call : language lm(formula = y ~ xr, data = fit.df)## $ terms :Classes 'terms', 'formula' length 3 y ~ xr## .. ..- attr(*, "variables")= language list(y, xr)## .. ..- attr(*, "factors")= int [1:2, 1] 0 1## .. .. ..- attr(*, "dimnames")=List of 2## .. .. .. ..$ : chr [1:2] "y" "xr"## .. .. .. ..$ : chr "xr"## .. ..- attr(*, "term.labels")= chr "xr"## .. ..- attr(*, "order")= int 1## .. ..- attr(*, "intercept")= int 1## .. ..- attr(*, "response")= int 1## .. ..- attr(*, ".Environment")=<environment: 0x7fc1bbbff440>## .. ..- attr(*, "predvars")= language list(y, xr)## .. ..- attr(*, "dataClasses")= Named chr [1:2] "numeric" "numeric"## .. .. ..- attr(*, "names")= chr [1:2] "y" "xr"## $ model :'data.frame': 2048 obs. of 2 variables:## ..$ y : num [1:2048] 984 987 990 996 1001 ...## ..$ xr: int [1:2048] 1 2 3 4 5 6 7 8 9 10 ...## ..- attr(*, "terms")=Classes 'terms', 'formula' length 3 y ~ xr## .. .. ..- attr(*, "variables")= language list(y, xr)## .. .. ..- attr(*, "factors")= int [1:2, 1] 0 1## .. .. .. ..- attr(*, "dimnames")=List of 2## .. .. .. .. ..$ : chr [1:2] "y" "xr"## .. .. .. .. ..$ : chr "xr"## .. .. ..- attr(*, "term.labels")= chr "xr"## .. .. ..- attr(*, "order")= int 1## .. .. ..- attr(*, "intercept")= int 1## .. .. ..- attr(*, "response")= int 1## .. .. ..- attr(*, ".Environment")=<environment: 0x7fc1bbbff440>## .. .. ..- attr(*, "predvars")= language list(y, xr)## .. .. ..- attr(*, "dataClasses")= Named chr [1:2] "numeric" "numeric"## .. .. .. ..- attr(*, "names")= chr [1:2] "y" "xr"## - attr(*, "class")= chr "lm"

8

Page 9: An overview of psd: Adaptive sine multitaper power ... · PDF fileAn overview of psd: Adaptive sine multitaper power spectral density estimation in R Andrew J. Barbour and Robert L

ats_lm <- atsar[["prew_lm"]]# AR model:str(atsar[["ardfit"]])

## List of 14## $ order : int 6## $ ar : num [1:6] 1.513 -1.104 0.672 -0.388 0.211 ...## $ var.pred : num 19.5## $ x.mean : num 1.4e-16## $ aic : Named num [1:101] 3598.8 872.8 258.2 81 26.3 ...## ..- attr(*, "names")= chr [1:101] "0" "1" "2" "3" ...## $ n.used : int 2048## $ order.max : num 100## $ partialacf : num [1:100, 1, 1] 0.8579 -0.5099 0.2894 -0.1653 0.0925 ...## $ resid : Time-Series [1:2048] from 1 to 2048: NA NA NA NA NA ...## $ method : chr "Yule-Walker"## $ series : chr "tser_prew_lm"## $ frequency : num 1## $ call : language ar.yw.default(x = tser_prew_lm, aic = TRUE, order.max = AR.max, demean = TRUE)## $ asy.var.coef: num [1:6, 1:6] 0.000487 -0.000733 0.000526 -0.000304 0.000148 ...## - attr(*, "class")= chr "ar"

ats_ar <- atsar[["prew_ar"]]

9

Page 10: An overview of psd: Adaptive sine multitaper power ... · PDF fileAn overview of psd: Adaptive sine multitaper power spectral density estimation in R Andrew J. Barbour and Robert L

plot(ts.union(orig.plus.trend = mc, linear = ats_lm, ar = ats_ar), yax.flip = TRUE,main = sprintf("Prewhitened Project MAGNET series"), las = 0)

mtext(sprintf("linear and linear+AR(%s)", atsar[["ardfit"]][["order"]]),line = 1.1)

1000

1500

2000

2500

3000

orig

.plu

s.tr

end

−30

−20

−10

0

10

20

30

linea

r

−15

−10

−5

0

5

10

15

0 500 1000 1500 2000

ar

Time

Prewhitened Project MAGNET serieslinear and linear+AR(6)

Figure 3: Pre-whitening of the Project MAGNET series (with a synthetic linear modelsuperimposed on it) assuming linear and linear-with-AR models.

10

Page 11: An overview of psd: Adaptive sine multitaper power ... · PDF fileAn overview of psd: Adaptive sine multitaper power spectral density estimation in R Andrew J. Barbour and Robert L

We didn’t necessarily need to deal with the sampling information since it is just 1 per km; but, supposing thesampling information was based on an interval, we could have used a negative value for X.frq, with which psdcorewould interpret as an interval (instead of a frequency). A quick example highlights the equivalency:

a <- rnorm(32)all.equal(psdcore(a, 1), psdcore(a, -1))

## [1] TRUE

Returning the the RSEIS comparison, we first estimate the PSD from mtapspec with 10 tapers:

tapinit <- 10Mspec <- mtapspec(ats_lm, deltat(ats_lm), MTP = list(kind = 2, inorm = 3,

nwin = tapinit, npi = 0))

where nwin is the number of tapers taken and npi is, from the documentation, the “number of Pi-prolate functions"(we leave it out for the sake of comparison). Note that the object returned is not of class ‘spec’:

str(Mspec)

## List of 12## $ dat : Time-Series [1:2048] from 1 to 2048: -16.23 -14.56 -12.02 -7.21 -3.13 ...## $ dt : num 1## $ spec : num [1:4096] 528 557 600 595 615 ...## $ dof : num [1:4096] 20 20 20 20 20 20 20 20 20 20 ...## $ Fv : num [1:4096] 4.45e-20 4.78e-02 5.36e-01 1.54 1.15 ...## $ Rspec : num [1:2049, 1:10] 1.86e-07 -9.32e+01 6.05e+02 1.16e+03 -2.97e+02 ...## $ Ispec : num [1:2049, 1:10] 0 -227 -569 665 1157 ...## $ freq : num [1:2049] 0 0.000244 0.000488 0.000732 0.000977 ...## $ df : num 0.000244## $ numfreqs: num 2049## $ klen : num 4096## $ mtm :List of 4## ..$ kind : num 2## ..$ nwin : num 10## ..$ npi : num 0## ..$ inorm: num 3

We will calculate the comparative spectra from

1. spectrum (20% cosine taper),

2. psdcore (with fixed tapers), and

3. pspectrum (allowing adaptive taper refinement)

and we will need to correct for normalization factors, as necessary, with normalize. Note that by default the normal-ization is set within pspectrum (with normalize) once the adaptive procedure is finished.

Xspec <- spec.pgram(ats_lm, pad = 1, taper = 0.2, detrend = TRUE, demean = TRUE,plot = FALSE)

Pspec <- psdcore(ats_lm, ntaper = tapinit)Aspec <- pspectrum(ats_lm, ntap.init = tapinit)

11

Page 12: An overview of psd: Adaptive sine multitaper power ... · PDF fileAn overview of psd: Adaptive sine multitaper power spectral density estimation in R Andrew J. Barbour and Robert L

## Stage 0 est. (pilot)## environment ** .psdEnv ** refreshed## detrending (and demeaning)## Stage 1 est. (Ave. S.V.R. -12.6 dB)## Stage 2 est. (Ave. S.V.R. -28.3 dB)## Stage 3 est. (Ave. S.V.R. -40.2 dB)## Stage 4 est. (Ave. S.V.R. -41.1 dB)## Stage 5 est. (Ave. S.V.R. -42.4 dB)## Normalized single-sided psd estimates ( psd ) for sampling-freq. 1

# Correct for double-sidedness of spectrum and mtapspec resultsclass(Mspec)

## [1] "list"

Mspec <- normalize(Mspec, dt, "spectrum")

## Normalized double-sided psd estimates ( spectrum ) for sampling-freq. 1

nt <- seq_len(Mspec[["numfreqs"]])mspec <- Mspec[["spec"]][nt]class(Xspec)

## [1] "spec"

Xspec <- normalize(Xspec, dt, "spectrum")

## Normalized double-sided psd estimates ( spectrum ) for sampling-freq. 1

These estimates are shown on the same scale in Figure 4.

12

Page 13: An overview of psd: Adaptive sine multitaper power ... · PDF fileAn overview of psd: Adaptive sine multitaper power spectral density estimation in R Andrew J. Barbour and Robert L

library(RColorBrewer)cols <- c("dark grey", brewer.pal(8, "Set1")[c(5:4, 2)])lwds <- c(1, 2, 2, 5)plot(Xspec, log = "dB", ylim = 40 * c(-0.4, 1), ci.col = NA, col = cols[1],

lwd = lwds[1], main = "PSD Comparisons")pltf <- Mspec[["freq"]]pltp <- dB(mspec)lines(pltf, pltp, col = cols[2], lwd = lwds[2])plot(Pspec, log = "dB", add = TRUE, col = cols[3], lwd = lwds[3])plot(Aspec, log = "dB", add = TRUE, col = cols[4], lwd = lwds[4])legend("topright", c("spec.pgram", "RSEIS::mtapspec", "psdcore", "pspectrum"),

title = "Estimator", col = cols, lwd = lwds, bg = "grey95", box.col = NA,cex = 0.8, inset = c(0.02, 0.03))

0.0 0.1 0.2 0.3 0.4 0.5

−10

0

10

20

30

40

frequency

spec

trum

(dB

)

PSD Comparisons

bandwidth = 7.05e−05, 95% C.I. is (−8.25,33.98)dB

Estimator

spec.pgramRSEIS::mtapspecpsdcorepspectrum

Figure 4: Comparisons of estimations of Project MAGNET power spectral densities.

13

Page 14: An overview of psd: Adaptive sine multitaper power ... · PDF fileAn overview of psd: Adaptive sine multitaper power spectral density estimation in R Andrew J. Barbour and Robert L

Because we did not specify the length of the FFT in mtapspec we end up with different length spectra. So, to formsome statistical measure of the results, we can interpolate PSD levels onto the psd-based frequencies (or reciprocally):

library(signal, warn.conflicts = FALSE)pltpi <- interp1(pltf, pltp, Pspec[["freq"]])

We regress the spectral values from mtapspec against the psdcore results because we have used them to produceuniformly tapered spectra with an equal number of sine tapers.

df <- data.frame(x = dB(Pspec[["spec"]]), y = pltpi, tap = unclass(Aspec[["taper"]]))summary(dflm <- lm(y ~ x + 0, df))

#### Call:## lm(formula = y ~ x + 0, data = df)#### Residuals:## Min 1Q Median 3Q Max## -2.2855 -0.3041 0.1996 0.9356 5.5479#### Coefficients:## Estimate Std. Error t value Pr(>|t|)## x 0.991899 0.002067 479.8 <2e-16 ***## ---## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1#### Residual standard error: 1.208 on 1023 degrees of freedom## Multiple R-squared: 0.9956,Adjusted R-squared: 0.9956## F-statistic: 2.302e+05 on 1 and 1023 DF, p-value: < 2.2e-16

df$res <- residuals(dflm)

We show the regression residuals in Figure 5. The structure visible at low power levels might be from curvaturebias in the mtapspec results, which manifests at short wavelengths in Figure 4.

14

Page 15: An overview of psd: Adaptive sine multitaper power ... · PDF fileAn overview of psd: Adaptive sine multitaper power spectral density estimation in R Andrew J. Barbour and Robert L

library(ggplot2)gr <- ggplot(df, aes(x = x, y = res)) + geom_abline(intercept = 0, slope = 0,

size = 2, color = "salmon") + geom_point(aes(color = tap))print(gr + theme_bw() + ggtitle("Regression residuals, colored by optimized tapers") +

xlab("Power levels, dB") + ylab(""))

−2

0

2

4

0 10 20 30Power levels, dB

175

200

225

250

tap

Regression residuals, colored by optimized tapers

Figure 5: Linear regression residuals of mtapspec against psdcore for Project MAG-NET PSD estimates.

15

Page 16: An overview of psd: Adaptive sine multitaper power ... · PDF fileAn overview of psd: Adaptive sine multitaper power spectral density estimation in R Andrew J. Barbour and Robert L

2.3 multitaper::spec.mtm

The function with the highest similarity to psd is spec.mtm in the multitaper package: it uses the sine multitapers,and can adaptively refine the spectrum. In fact, this function calls source code of a Fortran equivalent to psd authoredby R.L. Parker (2015) to do these operations.

There are some notable differences, though. By default spec.mtm uses the Discrete Prolate Spheroidal Sequences(dpss) of Thomson (1982), which can have very good spectral leakage suppression (assuming the number of tapers usedis appropriate for the desired resolution, which varies inversely with the time-bandwidth product). Spectral analysesusing dpss can have superior results if the series is relatively short (e.g. N < 1000), or has inherent spectra with sharplychanging features or deep wells. Improper usage of the dpss, however, can lead to severe bias. Thus, considerable careshould be given to parameter choices, which translates practicably to having many more knobs to turn.

2.4 sapa::SDF

This package was previously orphaned but, as of this writing, the package has a new maintainer, so we may add acomparison in future versions of this document.

2.5 bspec::bspec

An intriguing method for producing power spectral density estimates using Bayesian inference is presented by Röveret al. (2011) and included in the bspec package. Simplistically, the method uses a Student’s t likelihood function toestimate the distribution of spectral densities at a given frequency. We will use the spectra from the previous calculationto compare with bspec results. For this comparison we use the default settings for the a priori distribution scale anddegrees of freedom. In Figure 6 we have used the plot.bspec method and overlain the results found previously bypsdcore.

library(bspec)

#### Attaching package: ’bspec’#### The following object is masked from ’package:stats’:#### acf#### The following object is masked from ’package:base’:#### sample

print(Bspec <- bspec(ts(magnet$clean)))

## 'bspec' posterior spectrum (one-sided).## frequency range : 0--0.5## number of parameters: 1025## finite expectations : none## finite variances : none## call: bspec.default(x = ts(magnet$clean))

16

Page 17: An overview of psd: Adaptive sine multitaper power ... · PDF fileAn overview of psd: Adaptive sine multitaper power spectral density estimation in R Andrew J. Barbour and Robert L

par(las = 0)Bspec_plt <- plot(Bspec)with(Pspec, lines(freq, spec, col = "red", lwd = 2))

0.0 0.1 0.2 0.3 0.4 0.5

frequency f

1e−

031e

−01

1e+

011e

+03

1e+

05

(one

−si

ded)

pos

terio

r sp

ectr

um S

(f)

(0.1

)2(1

0)2

Figure 6: Project MAGNET PSD estimates from bspec, a Bayesian method, com-pared to the psdcore results shown in Figure 4.

17

Page 18: An overview of psd: Adaptive sine multitaper power ... · PDF fileAn overview of psd: Adaptive sine multitaper power spectral density estimation in R Andrew J. Barbour and Robert L

3 Can AR prewhitening improve the spectrum?This question must be addressed on a case-by-base basis; but, if there is significant auto-regressive structure in theseries then the answer is likely Yes. The MAGNET dataset is an example where the structure of the series is nicelyrepresented by an AR model with a random noise component.

Recall the results of the prewhitening in Section 2.2. While AR.max was set relatively high, only an AR(6) modelwas fit significantly, according to the AIC requirements. The estimated variance of the innovations is about 20 nT2. Ifthe innovation spectrum is flat (as we expect), this variance translates to power levels of about 16 decibels for a 1 kmsampling interval.

ntap <- 7psd_ar <- psdcore(ats_ar, ntaper = ntap, refresh = TRUE)dB(mean(psd_ar$spec))

## [1] 15.82754

In Figure 7 we have used pilot_spec to model the spectral response of the AR component of the series (solidblack line). The non-AR component (labelled "AR-innovations") contributes approximately ±3 dB to the originalspectrum. Overlain on these series is the adaptive spectrum found previously.

18

Page 19: An overview of psd: Adaptive sine multitaper power ... · PDF fileAn overview of psd: Adaptive sine multitaper power spectral density estimation in R Andrew J. Barbour and Robert L

pilot_spec(ats_lm, ntap = ntap, remove.AR = 100, plot = TRUE)plot(Aspec, log = "dB", add = TRUE, col = "grey", lwd = 4)plot(Aspec, log = "dB", add = TRUE, lwd = 3, lty = 3)spec.ar(ats_lm, log = "dB", add = TRUE, lwd = 2, col = "grey40")

0.0 0.1 0.2 0.3 0.4 0.5

0

10

20

30

frequency

spec

trum

(dB

)

Pilot spectrum estimation

bandwidth = 0.00781, 95% C.I. is (−2.77, 3.87)dB

(with AR(6) response)

original PSDAR−innovations PSD(mean 15.8 +− 3.0 dB)AR−filter response

Figure 7: AR response spectrum for the MAGNET dataset produced by pilot_spec.Overlain on the figure is the adaptive estimation from Figure 4 (dotted line), and theresults from spec.ar in dark grey; the shift is due to a normalization difference.

19

Page 20: An overview of psd: Adaptive sine multitaper power ... · PDF fileAn overview of psd: Adaptive sine multitaper power spectral density estimation in R Andrew J. Barbour and Robert L

4 Assessing spectral properties

4.1 Spectral uncertaintiesIt is important to place bounds on the uncertainties associated with a spectral estimate. In a multitaper algorithm theuncertainty is distributed as a χ2

ν variate where ν is the number of degrees of freedom, which is twice the number oftapers applied. A proxy for this is simply 1/

√ν − 1. Using ν = 2 ∗ K we can approximate the distribution of uncer-

tainties from the tapers alone; however, a more rigorous estimate comes from evaluating the appropriate distributionfor a coverage probability (e.g. p = 0.95). Among other calculations, spectral_properties returns the χ2

ν basedconfidence intervals for p = 0.95, as well as the approximate uncertainties.

To illustrate, we plot the uncertainties for an integer sequence4 of tapers [0, 50], shown in Figure 8. The benefits ofhaving more than just a few tapers becomes obvious, though the spectral uncertainty is asymptotically decreasing withtaper numbers and yields only slight improvements with logarithmic number of tapers.

Returning to the Project MAGNET spectra, we will compare the spectral uncertainties from psd to the those frombspec, the Bayesian method, for a coverage probability of 95%. Figure 9 shows the uncertainties as bounded polygons,which we calculate here:

spp <- spectral_properties(Pspec[["taper"]], db.ci = TRUE)spa <- spectral_properties(Aspec[["taper"]], db.ci = TRUE)str(spa)

## 'data.frame': 1024 obs. of 8 variables:## $ taper : int 170 170 170 170 170 170 171 171 171 171 ...## $ stderr.chi.lower : num -0.632 -0.632 -0.632 -0.632 -0.632 ...## $ stderr.chi.upper : num 0.676 0.676 0.676 0.676 0.676 ...## $ stderr.chi.median: num 0.23 0.23 0.23 0.23 0.23 ...## $ stderr.chi.approx: num 0.23 0.23 0.23 0.23 0.23 ...## $ resolution : num 0.334 0.334 0.334 0.334 0.334 ...## $ dof : num 340 340 340 340 340 340 342 342 342 342 ...## $ bw : num 0.167 0.167 0.167 0.167 0.167 ...

psppu <- with(Pspec, create_poly(freq, dB(spec), spp$stderr.chi.upper))pspau <- with(Aspec, create_poly(freq, dB(spec), spa$stderr.chi.upper))# and the Bayesian spectrum 95% posterior distribution rangepspb <- with(Bspec_plt, create_poly(freq, spectrum[, 1], spectrum[, 3], from.lower = TRUE))

4 Note the χ2ν distribution is defined for non-negative, non-integer degrees of freedom, but we cannot apply fractions of tapers.

20

Page 21: An overview of psd: Adaptive sine multitaper power ... · PDF fileAn overview of psd: Adaptive sine multitaper power spectral density estimation in R Andrew J. Barbour and Robert L

sp <- spectral_properties(as.tapers(1:50), p = 0.95, db.ci = TRUE)plot(stderr.chi.upper ~ taper, sp, type = "s", ylim = c(-10, 20), yaxs = "i",

xaxs = "i", xlab = expression("number of tapers (" * nu/2 * ")"), ylab = "dB",main = "Spectral uncertainties")

mtext("(additive factors)", line = 0.3, cex = 0.8)lines(stderr.chi.lower ~ taper, sp, type = "s")lines(stderr.chi.median ~ taper, sp, type = "s", lwd = 2)lines(stderr.chi.approx ~ taper, sp, type = "s", col = "red", lwd = 2)# to reach 3 db width confidence interval at p=.95abline(v = 33, lty = 3)abline(h = 0, lty = 3)legend("topright", c(expression("Based on " * chi^2 * "(p," * nu * ") and (1-p," *

nu * ")"), expression("" * chi^2 * "(p=0.5," * nu * ")"), "approximation"),lwd = c(1, 3, 3), col = c("black", "black", "red"), bg = "white")

10 20 30 40 50

−10

−5

0

5

10

15

20

Spectral uncertainties

number of tapers (ν 2)

dB

(additive factors)

Based on χ2(p,ν) and (1−p,ν)χ2(p=0.5,ν)approximation

Figure 8: Additive spectral uncertainties by number of tapers needed to create 95%confidence intervals. These quantized curves are found by evaluating the χ2

ν distribu-tion, where ν is the number of degrees of freedom (two per taper). The thick, red lineshows an approximation to these uncertainties based on 1/

√ν − 1, which is accurate

to within a few percent in most cases. The vertical dotted-line shows the number oftapers need to make the width less than 3 decibels.

21

Page 22: An overview of psd: Adaptive sine multitaper power ... · PDF fileAn overview of psd: Adaptive sine multitaper power spectral density estimation in R Andrew J. Barbour and Robert L

plot(c(-0.005, 0.505), c(-5, 40), col = NA, xaxs = "i", main = "Project MAGNET Spectral Uncertainty (p > 0.95)",ylab = "", xlab = "spatial frequency, 1/km", yaxt = "n", frame.plot = FALSE)

lines(c(2, 1, 1, 2) * 0.01, c(0, 0, 7, 7))text(0.04, 3.5, "7 dB")with(pspb, polygon(x.x, dB(y.y), col = "light blue", border = NA))text(0.26, 37, "Posterior distribution\n(bspec)", col = "#0099FF", cex = 0.8)with(psppu, polygon(x.x, y.y, col = "dark grey", border = "black", lwd = 0.2))text(0.15, 6, "Light: adaptive\ntaper refinement\n(pspectrum)", cex = 0.8)with(pspau, polygon(x.x, y.y, col = "light grey", border = "black", lwd = 0.2))text(0.4, 22, "Dark: Uniform\ntapering (psdcore)", cex = 0.8)box()

0.0 0.1 0.2 0.3 0.4 0.5

Project MAGNET Spectral Uncertainty (p > 0.95)

spatial frequency, 1/km

7 dB

Posterior distribution(bspec)

Light: adaptivetaper refinement

(pspectrum)

Dark: Uniformtapering (psdcore)

Figure 9: Project MAGNET spectral uncertainties for 95% coverage probability. Thefilled regions encompass the spectral uncertainties values based on the upper χ2

ν curveshown in Figure 8, light and dark for PSDs with and without adaptive taper optimiza-tion, respectively. The results from Figure 6 (Bayesian method) are shown in blue.

22

Page 23: An overview of psd: Adaptive sine multitaper power ... · PDF fileAn overview of psd: Adaptive sine multitaper power spectral density estimation in R Andrew J. Barbour and Robert L

4.2 Spectral resolutionThere is an inherent tradeoff between the number of tapers applied and the spectral resolution (effectively, the spectralbandwidth). In general, the greater the number of tapers applied, the lower the spectral resolution. We can use theinformation returned from spectral_properties to visualize the actual differences in resolution for the ProjectMAGNET PSD estimates; these are shown in Figure 10.

frq <- Aspec[["freq"]]relp <- (spa$resolution - spp$resolution)/spp$resolutionyl <- range(pretty(relp))par(las = 1, oma = rep(0, 4), omi = rep(0, 4), mar = c(4, 3, 2, 0))layout(matrix(c(1, 2), 1), heights = c(2, 2), widths = c(3, 0.5), respect = TRUE)plot(frq, relp, main = "Percent change in spectral resolution", col = "light grey",

ylim = yl, yaxs = "i", type = "h", ylab = "dB", xlab = "frequency, 1/km")lines(frq, relp)text(0.25, 45, "Adaptive relative to fixed", cex = 0.9)par(mar = c(4, 0, 2, 2))# empirical distribution of valuesboxplot(relp, range = 0, main = sprintf("%.01f", median(relp)), axes = FALSE,

ylim = yl, yaxs = "i", notch = TRUE)axis(4)

0.0 0.1 0.2 0.3 0.4 0.5

14

16

18

20

22

24Percent change in spectral resolution

frequency, 1/km

dB

15.0

14

16

18

20

22

24

Figure 10: Relative changes in resolution of the adaptive method relative to the fixedmultitaper method, plotted as a function of spatial frequency in units of percent. Thenon-zero median value implies the pilot spectrum was found using too-few tapers,according to the optimization algorithm. Positive values indicate broadening resolutionbandwidth.

23

Page 24: An overview of psd: Adaptive sine multitaper power ... · PDF fileAn overview of psd: Adaptive sine multitaper power spectral density estimation in R Andrew J. Barbour and Robert L

4.3 Visualizing the adaptive historyOne might be curious to study how the uncertainties change with each iteration. pspectrum saves an array of “histor-ical" data in its working environment. Specifically, it saves the frequencies, spectral values, and number of tapers ateach stage of the adaptive procedure, accessible with get_adapt_history. To ensure a fresh calculation and to adda few more iterations to visualize, we repeat the adaptive spectral analysis, and then bring the stage history into the.GlobalEnv environment:

pspectrum(ats_lm, niter = 4, plot = FALSE)

## Stage 0 est. (pilot)## environment ** .psdEnv ** refreshed## detrending (and demeaning)## Stage 1 est. (Ave. S.V.R. -13.1 dB)## Stage 2 est. (Ave. S.V.R. -27.8 dB)## Stage 3 est. (Ave. S.V.R. -44.9 dB)## Stage 4 est. (Ave. S.V.R. -48.9 dB)## Normalized single-sided psd estimates ( psd ) for sampling-freq. 1

str(AH <- get_adapt_history())

## List of 3## $ freq : num [1:1024] 0 0.000489 0.000978 0.001466 0.001955 ...## $ stg_kopt:List of 5## ..$ :Class 'tapers' atomic [1:1024] 7 7 7 7 7 7 7 7 7 7 ...## .. .. ..- attr(*, "last_recorded")= logi NA## .. .. ..- attr(*, "n_taper_limits_orig")= num [1:2] 1 7## .. .. ..- attr(*, "taper_positions")= logi NA## .. .. ..- attr(*, "span_was_set")= logi FALSE## .. .. ..- attr(*, "n_taper_limits")= int [1:2] 7 7## ..$ :Class 'tapers' atomic [1:1024] 19 20 21 22 23 24 24 25 26 27 ...## .. .. ..- attr(*, "last_recorded")= logi NA## .. .. ..- attr(*, "n_taper_limits_orig")= num [1:2] 1 36## .. .. ..- attr(*, "taper_positions")= logi NA## .. .. ..- attr(*, "span_was_set")= logi FALSE## .. .. ..- attr(*, "n_taper_limits")= int [1:2] 14 36## ..$ :Class 'tapers' atomic [1:1024] 63 63 64 65 66 67 68 69 70 71 ...## .. .. ..- attr(*, "last_recorded")= logi NA## .. .. ..- attr(*, "n_taper_limits_orig")= num [1:2] 1 98## .. .. ..- attr(*, "taper_positions")= logi NA## .. .. ..- attr(*, "span_was_set")= logi FALSE## .. .. ..- attr(*, "n_taper_limits")= int [1:2] 29 98## ..$ :Class 'tapers' atomic [1:1024] 169 168 167 166 165 164 163 162 161 160 ...## .. .. ..- attr(*, "last_recorded")= logi NA## .. .. ..- attr(*, "n_taper_limits_orig")= num [1:2] 1 209## .. .. ..- attr(*, "taper_positions")= logi NA## .. .. ..- attr(*, "span_was_set")= logi FALSE## .. .. ..- attr(*, "n_taper_limits")= int [1:2] 75 209## ..$ :Class 'tapers' atomic [1:1024] 165 164 164 164 163 163 163 163 163 163 ...## .. .. ..- attr(*, "last_recorded")= logi NA## .. .. ..- attr(*, "n_taper_limits_orig")= num [1:2] 1 236## .. .. ..- attr(*, "taper_positions")= logi NA

24

Page 25: An overview of psd: Adaptive sine multitaper power ... · PDF fileAn overview of psd: Adaptive sine multitaper power spectral density estimation in R Andrew J. Barbour and Robert L

## .. .. ..- attr(*, "span_was_set")= logi FALSE## .. .. ..- attr(*, "n_taper_limits")= int [1:2] 136 236## $ stg_psd :List of 5## ..$ : num [1:1024] 1181 1228 1318 1363 1377 ...## ..$ : num [1:1024] 1138 1130 1133 1146 1165 ...## ..$ : num [1:1024] 1232 1231 1232 1237 1245 ...## ..$ : num [1:1024] 1271 1271 1272 1272 1273 ...## ..$ : num [1:1024] 1273 1274 1274 1274 1275 ...

Followed by some trivial manipulation:

Freqs <- AH[["freq"]]Dat <- AH[["stg_psd"]]numd <- length(Freqs)numit <- length(Dat)StgPsd <- dB(matrix(unlist(Dat), ncol = numit))Dat <- AH[["stg_kopt"]]StgTap <- matrix(unlist(Dat), ncol = numit)

We can plot these easily with matplot or other tools. We show the adaptive history in Figure 11.

25

Page 26: An overview of psd: Adaptive sine multitaper power ... · PDF fileAn overview of psd: Adaptive sine multitaper power spectral density estimation in R Andrew J. Barbour and Robert L

Adaptive estimation history

01234

7 dB

(a) PSDs by stage

0

50

100

150

200

25043210

(b) Tapers by stage

0.0 0.1 0.2 0.3 0.4 0.5

7 dB

(c) Uncertainties by stage

Spatial frequency, km−1

(pilot spectrum −− uniform tapers)

Figure 11: Adaptive spectral estimation history. (A) PSD series for each stage of theadaptive method, offset by a few decibels for visualization purposes. Filled polygonsare shown in (B) for the number of tapers at each stage, and (C) the relative uncer-tainties of the PSDs. 26

Page 27: An overview of psd: Adaptive sine multitaper power ... · PDF fileAn overview of psd: Adaptive sine multitaper power spectral density estimation in R Andrew J. Barbour and Robert L

5 Call overviewShown in Figure 12 is a flow chart highlighting the essential functions involved in the adaptive estimation process. Theprimary function is pspectrum, which calls psdcore followed by riedsid repeatedly (niter times) to produce thefinal result.

Figure 12: Simplified call graph for psd. The dashed lines show a simplified circuitwhich the spectra and its tapers make during the iterative process.

27

Page 28: An overview of psd: Adaptive sine multitaper power ... · PDF fileAn overview of psd: Adaptive sine multitaper power spectral density estimation in R Andrew J. Barbour and Robert L

Session Info

utils::sessionInfo()

## R version 3.1.3 (2015-03-09)## Platform: x86_64-apple-darwin13.4.0 (64-bit)## Running under: OS X 10.9.5 (Mavericks)#### locale:## [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8#### attached base packages:## [1] stats graphics grDevices utils datasets methods## [7] base#### other attached packages:## [1] bspec_1.4 ggplot2_1.0.0 signal_0.7-4## [4] RColorBrewer_1.1-2 RSEIS_3.3-3 psd_1.0-0## [7] knitr_1.9#### loaded via a namespace (and not attached):## [1] colorspace_1.2-5 digest_0.6.8 evaluate_0.5.5 formatR_1.0## [5] grid_3.1.3 gtable_0.1.2 highr_0.4 labeling_0.3## [9] lattice_0.20-30 MASS_7.3-39 munsell_0.4.2 plyr_1.8.1## [13] proto_0.3-10 Rcpp_0.11.5 reshape2_1.4.1 RPMG_2.1-5## [17] Rwave_2.2 scales_0.2.4 stringr_0.6.2 tcltk_3.1.3## [21] tools_3.1.3 zoo_1.7-11

28

Page 29: An overview of psd: Adaptive sine multitaper power ... · PDF fileAn overview of psd: Adaptive sine multitaper power spectral density estimation in R Andrew J. Barbour and Robert L

ReferencesAgnew, D. C. (1992). The time-domain behavior of power-law noises. Geophysical Research Letters, 19:333–336.

Barbour, A. J. and Parker, R. L. (2014). psd: Adaptive, sine multitaper power spectral density estimation for R.Computers & Geosciences, 63:1–8.

Barbour, A. J. and Parker, R. L. (2015). psd: Adaptive, sine-multitaper power spectral density estimation. R packageversion 0.5.

Coleman, R. J. (1992). Project Magnet high-level vector survey data reduction. In Types and Characteristics of Datafor Geomagnetic Field Modeling, volume 3153, pages 215–248.

Korte, M., Constable, C., and Parker, R. (2002). Revised magnetic power spectrum of the oceanic crust. Journal ofGeophysical Research, 107(B9):2205.

Lees, J. M. and Park, J. (1995). Multiple-taper spectral analysis: A stand-alone C-subroutine. Computers & Geo-sciences, 21(2):199–236.

O’Brien, M. S., Parker, R. L., and Constable, C. G. (1999). Magnetic power spectrum of the ocean crust on largescales. Journal of Geophysical Research, 104(B12):29189–29.

Parker, R. L. (2015). PSD. http://igppweb.ucsd.edu/%7Eparker/Software/. Maintained software (last ac-cessed March 2015).

Parker, R. L. and O’Brien, M. S. (1997). Spectral analysis of vector magnetic field profiles. Journal of GeophysicalResearch, 102(B11):24815–24.

Percival, D. and Walden, A. (1993). Spectral analysis for physical applications. Cambridge University Press.

Prieto, G. A., Parker, R. L., Thomson, D. J., Vernon, F. L., and Graham, R. L. (2007). Reducing the bias of multitaperspectrum estimates. Geophysical Journal International, 171(3):1269–1281.

R Core Team (2014). R: A Language and Environment for Statistical Computing. R Foundation for Statistical Com-puting, Vienna, Austria. ISBN 3-900051-07-0.

Rahim, K. J., Burr, W. S., and Thomson, D. J. (2014). Applications of Multitaper Spectral Analysis to NonstationaryData. PhD thesis, Queen’s University. R package version 1.0-11.

Riedel, K. S. and Sidorenko, A. (1995). Minimum bias multiple taper spectral estimation. IEEE Trans. SP, 43(1):188–195.

Röver, C., Meyer, R., and Christensen, N. (2011). Modelling coloured residual noise in gravitational-wave signalprocessing. Classical and Quantum Gravity, 28(1):015010.

Thomson, D. J. (1982). Spectrum estimation and harmonic analysis. Proceedings of the IEEE, 70(9):1055–1096.

29