curve_set {GET}R Documentation

Create a curve_set object

Description

Create a curve_set object out of data provided in the right form.

Usage

curve_set(
  obs,
  sim = NULL,
  r = NULL,
  theo = NULL,
  allfinite = FALSE,
  verbose = TRUE
)

create_curve_set(curve_set, allfinite = FALSE, verbose = TRUE)

Arguments

obs

The observed data. See details.

sim

The simulated data. See details.

r

The argument values where the functions/vectors have been observed (or simulated). See details.

theo

The theoretical function. See details.

allfinite

Logical. TRUE requires that all values of the curves must be finite (not infinite and not missing, see is.finite). FALSE allows for infinite or missing values in the curves. These infinite and missing values can have consequences for the subsequent analyses. A warning is given if infinite or missing values exists (when verbose = TRUE).

verbose

Logical flag indicating whether to warn about the content.

curve_set

A list containing the element obs, and optionally the elements r, sim_m (same as sim, but in matrix format only) and theo. See details.

Details

The functions are used to clump together the functional data in the form that can be handled by the other GET functions (forder, central_region, global_envelope_test etc.). The functions take care of checking the content of the data, and save relevant information of the curves for global envelope methods to be used in particular for plotting the results with graphical interpretation.

obs must be either

If obs is a vector, sim must be either

If obs is a matrix or a list, sim is ignored.

If given, r describes the 1- or 2-dimensional argument values where the functions/vectors have been observed (or simulated). It must be either

If obs is a vector, theo can be given and it should then correspond to a theoretical function (e.g., under the null hypothesis). If present, its length must match the length of obs.

Value

An object of class curve_set containing the data. If the argument values are two-dimensional, then the curve_set is additionally a curve_set2d object.

See Also

plot.curve_set, plot.curve_set2d

Examples

# 1d
cset <- curve_set(r = 1:10, obs = matrix(runif(10*5), ncol=5))
plot(cset)
# 2d
cset <- curve_set(r = data.frame(x=c(rep(1:3, 3), 4), y=c(rep(1:3, each=3), 1),
                                 width=1, height=1),
                  obs = matrix(runif(10*5), ncol=5))
plot(cset)

[Package GET version 1.0-2 Index]