set_stats {anscombiser}R Documentation

Create a list of summary statistics

Description

Creates a list of summary statistics to pass to mimic.

Usage

set_stats(d = 2, means = 0, variances = 1, correlation = diag(2))

Arguments

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 correlation are allowed to be equal to 1 in absolute value.

Details

The vectors means and variances are recycled using rep_len to have length d.

Value

A list containing the following components.

Examples

# 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))

[Package anscombiser version 1.0.0 Index]