generate_indices {ehymet}R Documentation

Create a dataset with indices from a functional dataset in one or multiple dimensions

Description

Create a dataset with indices from a functional dataset in one or multiple dimensions

Usage

generate_indices(
  curves,
  k,
  grid,
  bs = "cr",
  indices = c("EI", "HI", "MEI", "MHI"),
  ...
)

Arguments

curves

matrix with dimension n \times p in the case of a one-dimensional functional dataset, or array of dimension n \times p \times q in the case of a multivariate functional dataset. n represents the number of curves, p the number of values along the curve, and in the second case, q is the number of dimensions.

k

Number of basis functions for the B-splines. If equals to 0, the number of basis functions will be automatically selected.

grid

Atomic vector of type numeric with two elements: the lower limit and the upper limit of the evaluation grid. If not provided, it will be selected automatically.

bs

A two letter character string indicating the (penalized) smoothing basis to use. See smooth.terms.

indices

Set of indices to be applied to the dataset. They should be any between EI, HI, MEI and MHI.

...

Additional arguments (unused)

Value

A dataframe containing the indices provided in indices for original data, first and second derivatives

Examples

x1 <- array(c(1, 2, 3, 3, 2, 1, 5, 2, 3, 9, 8, 7, -1, -5, -6, 2, 3, 0, -1, 0, 2, -1, -2, 0),
  dim = c(3, 4, 2)
)
generate_indices(x1, k = 4)

x2 <- matrix(c(1, 2, 3, 3, 2, 1, 5, 2, 3, 9, 8, 7), nrow = 3, ncol = 4)
generate_indices(x2, k = 4)


[Package ehymet version 0.1.0 Index]