gendata {GFM}R Documentation

Generate simulated data

Description

Generate simulated data from high dimensional genelized nonlinear factor model.

Usage

  gendata(seed=1, n=300, p=50, type='homonorm', q=6, rho=1)

Arguments

seed

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

n

a positive integer, the sample size.

p

an positive integer, the variable dimension.

type

a character, specify the variables type, including type = c('homonorm', 'heternorm', 'pois', 'norm_pois', 'pois_bino').

q

a positive integer, the number of factors.

rho

a positive number, controlling the magnitude of loading matrix.

Value

return a list including two components:

X

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

H0

a n-by-q matrix, the true lantent factor matrix.

B0

a p-by-q matrix, the true loading matrix, the last pzero rows are vectors of zeros.

ind_nz

a integer vector, the index vector for which rows of B0 not zeros.

Note

nothing

Author(s)

Wei Liu

References

Wei Liu, Huazhen Lin, Shurong Zheng & Jin Liu (2019) . Generalized factor model for ultra-high dimensional mixed data. Submitted.

See Also

Factorm; gfm.

Examples

  dat <- gendata(n=300, p = 500)
  str(dat)

[Package GFM version 1.1.0 Index]