Skip to contents

Generates multiple latent processes (mu.1, mu.2, ..., mu.k) based on the specified input parameters, including process type, coefficients, exponents, and the number of evaluation points.

Usage

rprocKmu(t, process, c, k = NULL)

Arguments

t

A numeric vector specifying the grid points (argvals) at which the latent processes are evaluated.

process

A character vector specifying the types of the latent processes. Available options include "poly1", "poly2", "sin", "cos", "sin_cos", and "cos_sin".

c

A numeric vector of coefficients used to scale each of the latent processes.

k

An optional numeric vector of exponents used in the latent processes. These exponents control the shape and curvature of the processes, and are only applicable for "poly1" and "poly2" process types.

Value

A list containing the following elements:

  • mu: A list of fdata objects, each representing one of the latent processes.

Details

The available latent process types are described as follows:

  • "poly1": \(\mu_i(t) = c_i \cdot (1 - t) \cdot t^{k_i}\), where c.i is the scaling coefficient and k.i controls the curvature.

  • "poly2": \(\mu_i(t) = c_i \cdot (1 - t)^{k_i} \cdot t\), where c.i is the scaling coefficient and k.i controls the curvature.

  • "sin": \(\mu_i(t) = c_i \cdot \sin(t)\), where c.i is the scaling coefficient that adjusts the amplitude.

  • "cos": \(\mu_i(t) = c_i \cdot \cos(t)\), where c.i is the scaling coefficient that adjusts the amplitude.

  • "sin_cos": \(\mu_i(t) = c_i \cdot (\sin(t) - \cos(t))\), where c.i is the scaling coefficient.

  • "cos_sin": \(\mu_i(t) = c_i \cdot (\cos(t) - \sin(t))\), where c.i is the scaling coefficient.

Examples

t <- seq(0, 1, length.out = 101)
fproces <- rprocKmu(t, c("poly1", "poly2", "sin", "cos"), 
                    c(10, -10, 1, 1), c(1, 1, NA, NA))
plot(fproces, main = "Latent Processes")