Learn R Programming

quantspec (version 1.2-4)

LagEstimator-constructor: Create an instance of the LagEstimator class.

Description

A LagEstimator object can be created from numeric, a ts, or a zoo object. Also a LagOperator and a Weight object can be used to create different types of estimators.

Usage

lagEstimator(
  Y,
  frequencies = 2 * pi/length(Y) * 0:(length(Y) - 1),
  levels.1 = 0.5,
  levels.2 = levels.1,
  weight = lagKernelWeight(K = length(Y), bw = 100),
  type = c("clippedCov")
)

Value

Returns an instance of LagEstimator.

Arguments

Y

a time series (numeric, ts, or zoo object) or a LagOperator from which to determine the LagEstimator

frequencies

A vector containing (Fourier-)frequencies at which to determine the smoothed periodogram.

levels.1

the first vector of levels for which to compute the LagEstimator

levels.2

the second vector of levels for which to compute the LagEstimator

weight

Object of type Weight to be used for smoothing.

type

if Y is a time series, this indicates which LagOperator will be used

Examples

Run this code
Y <- rnorm(100)
levels.1 <- c(0.1,0.5,0.9)
weight <- lagKernelWeight(W = WParzen,  bw = 10, K = length(Y))
lagOp <- clippedCov(Y,levels.1 = levels.1)
lagEst <- lagEstimator(lagOp, weight = weight)

Run the code above in your browser using DataLab