BiVarInt: BiVarInt

View source: R/BiVarInt.R

BiVarIntR Documentation

BiVarInt

Description

BiVarInt

Usage

BiVarInt(
  z1,
  z2,
  gap1,
  gap2,
  maxit,
  progress = FALSE,
  sigClip = 0.999,
  delT = 1
)

Arguments

z1

first time series (possibly) with gaps, denoted by NA.

z2

second time series (possibly) with gaps, denoted by NA.

gap1

indexes of missing values from z2, from 1:N, where N = length(z2).

gap2

indexes of missing values from z1, from 1:N, where N = length(z1).

maxit

maximum number of iterations for convergence in interpolation.

progress

logical: should progress be written to screen as iterations proceed?

sigClip

probabilistic significance for choice of line components, dividing series

delT

the time step delta-t in seconds.

Details

This function implements the algorithm developed and explained in Chapter 4 of

Additional details... A list of five elements, including an interpolated series: zF the final interpolated series. p the number of iterations. diffC the difference between the final series and the previous iteration (metric for convergence). zA a list of interim series, showing each stage of the convergence. converge logical indicating whether convergence occurred.

Value

zF the final interpolated series.

Examples

library("tsinterp")
          data("flux")
          z1 <- flux$SagOrig
          z1[which(flux$S == FALSE)] <- NA
          z2 <- flux$PentOrig
          # Unfortunately, not fast enough to run for CRAN checks
          sagInt <- BiVarInt(z1 = z1, z2 = z2, gap1 = which(flux$S == FALSE), 
                             gap2 = NULL, maxit = 3, delT = 86400)

wesleyburr/tsinterp documentation built on Jan. 28, 2024, 11:16 a.m.