set_stats {anscombiser} | R Documentation |
Creates a list of summary statistics to pass to mimic
.
set_stats(d = 2, means = 0, variances = 1, correlation = diag(2))
d |
An integer that is no smaller than 2. |
means |
A numeric vector of sample means. |
variances |
A numeric vector of positive sample variances. |
correlation |
A numeric correlation matrix. None of the off-diagonal
entries in |
The vectors means
and variances
are recycled using
rep_len
to have length d
.
A list containing the following components.
means
a d
-vector of sample means.
variances
a d
-vector sample variances.
correlation
a d
by d
correlation matrix.
# Uncorrelated with zero means and unit variances set_stats() # Sample correlation = 0.9 set_stats(correlation = matrix(c(1, 0.9, 0.9, 1), 2, 2))