blob: b36251838a7b8c18616118779d5effb997c7e1be (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/simulate_data.R
\name{simulate_data}
\alias{simulate_data}
\title{Simulate Multivariate Normal Data}
\usage{
simulate_data(
n,
p,
rho = 0.8,
contamination = 0,
block_fraction = 0.5,
t_df = Inf,
exact_contamination = FALSE
)
}
\arguments{
\item{n}{Number of observations to generate.}
\item{p}{Number of features to simulate.}
\item{rho}{The AR(1) decay parameter (default 0.8). Setting rho = 0 uses the identity matrix as the true covariance (0 <= rho < 1).}
\item{contamination}{The proportions of rows to contaminate as outlier observations (default 0, 0 <= contamination <= 1).}
\item{block_fraction}{The fraction of the covariance matrix to form as AR(1) structure (default 0.5, 0 < block_fraction <= 1).}
\item{t_df}{The degrees of freedom to use for scaling observations into heavy tails (default Inf, 0 <= t_df < 2).}
}
\value{
A list with X, S and a vector identifying the contaminated rows.
}
\description{
Given a set of parameters controlling the properties
of the true covariance matrix, simulate data
with the intention of evaluating the performance
of covariance or correlation matrix estimators.
}
\examples{
X_obj <- generate_data(n = 10, p = 10)
X <- X_obj$X
S_true <- X_obj$S
}
|