Learn R Programming

fdars (version 0.3.3)

trimvar: Compute Functional Trimmed Variance

Description

Computes the trimmed variance by excluding curves with lowest depth.

Usage

trimvar(
  fdataobj,
  trim = 0.1,
  method = c("FM", "mode", "RP", "RT", "BD", "MBD", "FSD", "KFSD", "RPD"),
  ...
)

Value

An fdata object containing the trimmed variance function.

Arguments

fdataobj

An object of class 'fdata'.

trim

Proportion of curves to trim (default 0.1).

method

Depth method to use. One of "FM", "mode", "RP", "RT", "BD", "MBD", "FSD", "KFSD", or "RPD". Default is "FM".

...

Additional arguments passed to the depth function.

Examples

Run this code
fd <- fdata(matrix(rnorm(100), 10, 10))
tv <- trimvar(fd, trim = 0.2)
tv_mode <- trimvar(fd, trim = 0.2, method = "mode")

Run the code above in your browser using DataLab