simulate_matrix: Simulate n points of dimension p.

Description Usage Arguments Value Author(s) Examples

View source: R/simulate.R

Description

Points are simulated by drawing values of each dimension from a normal distribution of mean 0 and standard deviation equals to 1. The mean of each dimension is forced to 0 (data are centred). By default variable are also scaled to enforce a strandard deviation strictly equal to 1. Covariances between dimensions are not controled. Therefore they are expected to be equal to 0 and reflect only the random distribution of the covariance between two random vectors.

Usage

1
simulate_matrix(n, p, equal_var = TRUE)

Arguments

n

an int value indicating the number of observations.

p

an int value indicating the number of dimensions (variables) simulated

equal_var

a logical value indicating if the dimensions must be scaled to force sd=1. TRUE by default.

Value

a numeric matrix of n rows and p columns

Author(s)

Eric Coissac

Christelle Gonindard-Melodelima

Examples

1
2
3
sim1 <- simulate_matrix(25,10)
class(sim1)
dim(sim1)

ProcMod documentation built on May 12, 2021, 9:08 a.m.