GetVarFromSpectra: Variance estimate by integrating a part of the spectrum

View source: R/GetVarFromSpectra.R

GetVarFromSpectraR Documentation

Variance estimate by integrating a part of the spectrum

Description

Variance estimate by integrating a part of the spectrum

Usage

GetVarFromSpectra(spec, f, dfreq = NULL, df.log = 0, bw = 3)

Arguments

spec

spectrum (list of spec,freq,dof) to be analysed

f

f[1],f[2]: frequency interval to be analysed

dfreq

frequency discretisation used in the temporary interpolation

df.log

if > 0, smooth the spectra prior to integrating

bw

the bandwidth assumed for the confinterval calculation (from the multitaper spectral estimate)

Value

list(var,dof) variance and corresponding dof

Author(s)

Thomas Laepple

Examples

x<-ts(rnorm(100))
spec<-SpecMTM(x)
var(x) #Sample variance of the timeseries
GetVarFromSpectra(spec,c(1/100,0.5))
GetVarFromSpectra(spec,c(0.25,0.5))

EarthSystemDiagnostics/paleospec documentation built on Feb. 17, 2024, 4:36 p.m.