generate_X: Simulate a normal data set S = (X).

Description Usage Arguments Value Examples

View source: R/generate_normal.R

Description

Creates a toy data set S = (X) where the columns of X are sampled from an independent Gaussian distribution with mean μ_i and standard deviation σ_i, i.e. N(μ_i, σ_i^2). The final dimension will be n \times p, with the number of data points n to be specified.

Usage

1
generate_X(n = 100, mu = rep(0, 10), sigma = rep(1, 10))

Arguments

n

The desired number of data points in the data set.

mu

A p-dimensional vector of means for μ.

sigma

A p-dimensional vector of non-negative standard deviations for σ.

Value

An n \times p dimensional data frame given by S = (X). In the default case, the columns X_i are sampled from N(0,1), n = 100 and p = 10.

Examples

1
2
3
generate_X()

generate_X(n = 40, mu = 1:10, sigma = rep(1, 10))

lamke07/stat545lamke07 documentation built on Dec. 21, 2021, 8:49 a.m.