Learn R Programming

slasso (version 1.0.1)

simulate_data: Simulate data through the function-on-function linear regression model

Description

Generate synthetic data as in the simulation study of Centofanti et al. (2022).

Usage

simulate_data(scenario, n_obs = 3000, type_x = "Bspline")

Value

A list containing the following arguments:

X: Covariate matrix, where the rows correspond to argument values and columns to replications.

Y: Response matrix, where the rows correspond to argument values and columns to replications.

X_fd: Coavariate functions.

Y_fd: Response functions.

clus: True cluster membership vector.

Arguments

scenario

A character strings indicating the scenario considered. It could be "Scenario I", "Scenario II", "Scenario III", and "Scenario IV".

n_obs

Number of observations.

type_x

Covariate generating mechanism, either Bspline or Brownian.

References

Centofanti, F., Fontana, M., Lepore, A., & Vantini, S. (2022). Smooth lasso estimator for the function-on-function linear regression model. Computational Statistics & Data Analysis, 176, 107556.

Examples

Run this code
library(slasso)
data<-simulate_data("Scenario II",n_obs=150)

Run the code above in your browser using DataLab