choose_beta: choose_beta

View source: R/Simulate_Data.R

choose_betaR Documentation

choose_beta

Description

Compute a coefficient function for the Function Linear Regression model.

Usage

choose_beta(param)

Arguments

param

a list containing:

grid

a numerical vector, the time points.

p

a numerical value, the length of the vector grid.

shape

a character vector: "smooth", "random_smooth", "simple", "simple_bis", "random_simple", "sinusoid", "flat_sinusoid" and "sharp"

Details

Several shapes are available.

Value

A numerical vector which corresponds to the coefficient function at given times points (grid).

Examples

### smooth
param <- list(p=100,grid=seq(0,1,length=100),shape="smooth")
beta_function <- choose_beta(param)
plot(param$grid,beta_function,type="l")
### random_smooth
param <- list(p=100,grid=seq(0,1,length=100),shape="random_smooth")
beta_function <- choose_beta(param)
plot(param$grid,beta_function,type="l")
### simple
param <- list(p=100,grid=seq(0,1,length=100),shape="simple")
beta_function <- choose_beta(param)
plot(param$grid,beta_function,type="s")
### simple_bis
param <- list(p=100,grid=seq(0,1,length=100),shape="simple_bis")
beta_function <- choose_beta(param)
plot(param$grid,beta_function,type="s")
### random_simple
param <- list(p=100,grid=seq(0,1,length=100),shape="random_simple")
beta_function <- choose_beta(param)
plot(param$grid,beta_function,type="s")
### sinusoid
param <- list(p=100,grid=seq(0,1,length=100),shape="sinusoid")
beta_function <- choose_beta(param)
plot(param$grid,beta_function,type="l")
### flat_sinusoid
param <- list(p=100,grid=seq(0,1,length=100),shape="flat_sinusoid")
beta_function <- choose_beta(param)
plot(param$grid,beta_function,type="l")
### sharp
param <- list(p=100,grid=seq(0,1,length=100),shape="sharp")
beta_function <- choose_beta(param)
plot(param$grid,beta_function,type="l")

bliss documentation built on May 29, 2024, 8:35 a.m.