simulate {anomaly} | R Documentation |
Generates multivariate simulated data having n observations and p variates. The data have a standard Gaussian distribution except at
a specified number of locations where there is a change in mean in a proportion of the variates. The function is useful for generating data to demonstrate and assess
multivariate anomaly detection methods such as capa.mv
and pass
.
simulate( n = 100, p = 10, mu = 1, locations = 40, durations = 20, proportions = 0.1 )
n |
The number of observations. The default is |
p |
The number of variates. The default is |
mu |
The change in mean. Default is |
locations |
A vector of locations (or scalar for a single location) where the change in mean occurs. The default is |
durations |
A scalar or vector (the same length as |
proportions |
A scalar or vector (the same length as |
A matrix with n rows and p columns
library(anomaly) sim.data<-simulate(500,200,2,c(100,200,300),6,c(0.04,0.06,0.08))