gendata_Fac {TOSI} | R Documentation |
Generate simulated data
Description
Generate simulated data from high dimensional sparse factor model.
Usage
gendata_Fac(n, p, seed=1, q=6, pzero= floor(p/4),
sigma2=0.1, gamma=1, heter=FALSE, rho=1)
Arguments
n |
a positive integer, the sample size. |
p |
an positive integer, the variable dimension. |
seed |
a nonnegative integer, the random seed, default as 1. |
q |
a positive integer, the number of factors. |
pzero |
a positive integer, the number of zero loading vectors, default as p/4. |
sigma2 |
a positive real number, the homogenous variance of error term. |
gamma |
a positive number, the common component of heteroscedasticity of error term. |
heter |
a logical value, indicates whether generate heteroscendastic error term. |
rho |
a positive number, controlling the magnitude of loading matrix. |
Value
return a list including two components:
X |
a |
H0 |
a |
B0 |
a |
ind_nz |
a integer vector, the index vector for which rows of |
Note
nothing
Author(s)
Liu Wei
See Also
Examples
dat <- gendata_Fac(n=300, p = 500)
str(dat)