Computes the mean function of a functional time series using various methods.

# S3 method for class 'fts'
mean(
  x,
  method = c("coordinate", "FM", "mode", "RP", "RPD", "radius"),
  na.rm = TRUE,
  alpha,
  beta,
  weight,
  ...
)

Arguments

x

A functional time series object of class fts, fds, or sfts.

method

Method for computing the mean: "coordinate" (default), "FM", "mode", "RP", "RPD", or "radius".

na.rm

Logical. If TRUE, remove missing values (default: TRUE).

alpha

Parameter for radius depth method.

beta

Parameter for radius depth method.

weight

Weight parameter for radius depth method.

...

Additional arguments passed to depth functions.

Value

A list containing:

x

Grid points

y

Mean function values

Details

The available methods are:

  • "coordinate": Coordinate-wise mean

  • "FM": Fraiman-Muniz depth-based mean

  • "mode": Mode depth-based mean

  • "RP": Random projection depth-based mean

  • "RPD": Random projection depth-based mean

  • "radius": Radius depth-based mean

References

Fraiman, R., & Muniz, G. (2001). Trimmed means for functional data. Test, 10(2), 419-440.

See also

median.fts, var.fts, sd.fts

Examples

if (FALSE) { # \dontrun{
# Load example data
data(pm_10_GR)

# Compute mean function
mean_func <- mean(pm_10_GR, method = "coordinate")

# Plot mean function
plot(mean_func$x, mean_func$y, type = "l", 
     xlab = "Time", ylab = "Mean function")
} # }