gendata_Mean {TOSI} | R Documentation |
Generate simulated data from for high-dimensional mean model.
gendata_Mean(n, p, s0= floor(p/2), seed=1, rho= 1, tau=1)
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. |
return a list including two components:
X |
a |
mu |
a p-dimensional vector, the mean vector. |
p0 |
a integer vector, the number of nonzero components of mean. |
nothing
Liu Wei
dat <- gendata_Mean(n=100, p = 100, s0=3)
str(dat)