Learn R Programming

refund (version 0.1-40)

generate_functional_covariate: Generate functional covariate

Description

Generate smooth random functions via B-spline basis for use in simulations.

Usage

generate_functional_covariate(
  n,
  xind,
  type = "bspline",
  bs_dim = NULL,
  seed = NULL
)

Value

Numeric matrix (n x length(xind)) of functional covariate values.

Arguments

n

Integer, number of observations (curves to generate).

xind

Numeric vector of evaluation points for the functional covariate.

type

Character string specifying generation method. Currently only "bspline" is supported.

bs_dim

Integer, dimension of B-spline basis (default 7).

seed

Optional integer seed for reproducibility within this call.