Learn R Programming

squat (version 0.5.0)

smooth: QTS Smoothing via SLERP Interpolation

Description

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

Usage

smooth(x, ...)

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

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

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

Value

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

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.

Examples

Run this code
smooth(vespa64$igp[[1]])
smooth(vespa64$igp)

Run the code above in your browser using DataLab