gendata | R Documentation |
Generate simulated data from high dimensional genelized nonlinear factor model.
gendata(seed = 1, n = 300, p = 50,
type = c('homonorm', 'heternorm',
'pois', 'bino', 'norm_pois', 'pois_bino', 'npb'),
q = 6, rho = 1, n_bin=1)
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 types for generated data, default as 'homonorm', representing the homogeneous gaussian variables. |
q |
a positive integer, the number of factors. |
rho |
a positive number, controlling the magnitude of loading matrix. |
n_bin |
a positive integer, specify the number of trails for the binomial variables when |
This function provides a variaty of mix of different variable types, in which 'homonorm' represents the generated data with only homogenous normal variables; 'heternorm' represents the data with only heterogenous normal variables; 'pois' means the data with only poisson variables; 'bino' means the data with only binomial variables; 'norm_pois' means the mix of normal and poisson variables; 'pois_bino' represents the mix of poisson and binomial variables; and 'npb' means the most complex mix of normal, poisson and binomial variables.
return a list including two components:
X |
a |
XList |
a list consisting of the above observed data matrices with the same rows n (observations), and different columns (p1,p2, ..., p_d) and p columns in total, where d is the types of variables, pj is the dimension of varibles with the j-th type. |
H0 |
a |
B0 |
a |
mu0 |
a p-dimensional vector, the true intercept terms. |
nothing
Wei Liu
Factorm; gfm
.
dat <- gendata(n=300, p = 500)
str(dat)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.