data_genDp: data_genDp

Description Usage Arguments Value Examples

View source: R/FPOPapprox2D.R

Description

Generation of data of dimension p with a given values of means and changepoints

Usage

1
2
3
4
5
6
7
data_genDp(
  p,
  n,
  chpts = NULL,
  means = matrix(0, ncol = 1, nrow = p),
  noise = 1
)

Arguments

p

parameter of dimension.

n

number of data point.

chpts

a vector of increasing changepoint indices (last element is always less then n). By default, 'chpts = NULL' (the data without changepoints).

means

matrix of successive means for data, by default 'means = matrix(0, ncol = 1, nrow = p)'.

noise

standard deviation of an additional normal noise, by default 'noise = 1'.

Value

matrix of data of dimension p x n with a given values of means by the segmentation.

Examples

1
2
3
4
5
6
7
set.seed(13)

size <- 1000

Data1 =  data_genDp(p = 2, n = size, chpts = NULL, means = matrix(0, ncol = 1, nrow = 2), noise = 1) 

Data2 =  data_genDp(p = 2, n = size, chpts = 500, means = matrix(c(0,0,1,1), nrow = 2), noise = 1) 

lpishchagina/FPOPapprox2D documentation built on Dec. 21, 2021, 11:49 a.m.