Learn R Programming

TOSI (version 0.3.0)

gendata_Mean: Generate simulated data

Description

Generate simulated data from for high-dimensional mean model.

Usage

gendata_Mean(n, p, s0= floor(p/2), seed=1, rho= 1, tau=1)

Value

return a list including two components:

X

a n-by-p matrix, the observed data matrix.

mu

a p-dimensional vector, the mean vector.

p0

a integer vector, the number of nonzero components of mean.

Arguments

n

a positive integer, the sample size.

p

an positive integer, the variable dimension.

s0

a positive integer, the number of nonzero components of mean .

seed

a nonnegative integer, the random seed, default as 1.

rho

a positive number between 0 and 1, controlling the correlation of data.

tau

a positive number, controlling the magnitude of covriance matrix.

Author

Liu Wei

Examples

Run this code
  dat <- gendata_Mean(n=100, p = 100, s0=3)
  str(dat)

Run the code above in your browser using DataLab