dataG2: Two-dimensional gaussian segmentation

Description Usage Arguments Value Examples

Description

Simulating a two-dimenstional segmentation with a given number of segments

Usage

1
2
dataG2(mean1 = c(0, 1, 1, 0), mean2 = c(0, 0, 1, 1), tau = c(0.25, 0.5,
  0.75, 1), sigma = 1, n = 100)

Arguments

mean1

Vector of means for the first dimension

mean2

Vector of means for the second dimension

tau

relative position (between 0 and 1) of the changepoints (the last position is always 1)

sigma

A positive number: the value (unique) of the standard deviation for all the Gaussian laws in the simulation #' @param n The number of data point to simulate

n

The number of data point to simulate

Value

A matrix of data of dimension 2 x n generated by the simulated segmentation

Examples

1
2
3
4
5
6
data <- dataG2(sigma = 0.05, n=50)
max = max(data);min = min(data)
plot(1:50,data[1,],ylim = c(min,max))
par(new = TRUE)
plot(1:50,data[2,],ylim = c(min,max),col=2)
par(new = FALSE)

vrunge/plotFPOP documentation built on May 29, 2019, 9:57 a.m.