smooth {squat}R Documentation

QTS Smoothing via SLERP Interpolation

Description

This function performs a smoothing of a QTS by SLERP interpolation.

Usage

smooth(x, ...)

## Default S3 method:
smooth(
  x,
  kind = c("3RS3R", "3RSS", "3RSR", "3R", "3", "S"),
  twiceit = FALSE,
  endrule = c("Tukey", "copy"),
  do.ends = FALSE,
  ...
)

## S3 method for class 'qts'
smooth(x, alpha = 0.5, ...)

## S3 method for class 'qts_sample'
smooth(x, alpha = 0.5, ...)

Arguments

x

An object of class qts or qts_sample.

...

Extra arguments passed on to next methods.

kind

a character string indicating the kind of smoother required; defaults to "3RS3R".

twiceit

logical, indicating if the result should be ‘twiced’. Twicing a smoother S(y) means S(y) + S(y - S(y)), i.e., adding smoothed residuals to the smoothed values. This decreases bias (increasing variance).

endrule

a character string indicating the rule for smoothing at the boundary. Either "Tukey" (default) or "copy".

do.ends

logical, indicating if the 3-splitting of ties should also happen at the boundaries (ends). This is only used for kind = "S".

alpha

A numeric value in ⁠[0,1]⁠ specifying the amount of smoothing. The closer to one, the smoother the resulting QTS. Defaults to 0.5.

Value

An object of the same class as the input argument x which is a smooth version of the input QTS.

Examples

smooth(vespa64$igp[[1]])
smooth(vespa64$igp)

[Package squat version 0.3.0 Index]