dataSim {ltsspca} | R Documentation |
Simulate data
Description
the function that generates the simulation data set
Usage
dataSim(n = 200, p = 20, bLength = 4, a = c(0.9, 0.5, 0),
SD = c(10, 5, 2), eps = 0, eta = 25, setting = "3", seed = 123,
vc = NULL)
Arguments
n |
number of observations |
p |
number of variables |
bLength |
the number of correlated variables in the first k blocks |
a |
numveric vector of length k+1 that contains the correlations between the variables in each block (the last block contains uncorrelated variables); by default is (0.9, 0.5, 0) |
SD |
numveric vector of length k+1 that contains the standard deviation of the variables in each block (the last block contains uncorrelated variables); by default is (10, 5, 2) |
eps |
proportion of outliers, default is 0 |
eta |
parameter that contols the outlyingness, default is 25 |
setting |
type of outliers: |
seed |
random seed used to simulate the data |
vc |
controls the direction of the score outliers within the PC subspace, default is NULL |
Value
a list with components
data |
generated data matrix |
ind |
row indices of outliers |
R |
Correlation matrix of the data |
Sigma |
Covariance matrix of the data |