simulate_functions {veesa}R Documentation

Simulate example functional data

Description

Function for simulating a set of functional data based on a deterministic function with covariates that affect the shape of the functions

Usage

simulate_functions(M, N, seed)

Arguments

M

Number of functions

N

Number of samples per function

seed

Seed for reproducibility

Details

The functions are generated using the following equation:

f(t) = (x_1*exp(-((t-0.3)^2)/0.005)) + (x_2(-((t-(0.7+x_3))^2/0.005)))

where the covariates are generated as follows:

Value

Data frame with the following columns (where f is the function):

Examples

# Simulate data
sim_data = simulate_functions(M = 100, N = 75, seed = 20211130)

[Package veesa version 0.1.6 Index]