Description Usage Arguments Details Value Author(s) References Examples
simulate functional compositional data.
1 2 3 4 5 6 7 8 9 | Fcomp_Model(n, p, m = 0, intercept = TRUE,
interval = c(0, 1), n_T = 100, obs_spar = 0.6, discrete = FALSE,
SNR = 1, sigma = 2, Nzero_group = 4,
rho_X, Corr_X = c("CorrCS", "CorrAR"),
rho_T, Corr_T = c("CorrAR", "CorrCS"),
range_beta = c(0.5, 1), beta_c = 1, beta_C ,
theta.add = c(1, 2, 5, 6), gamma = 0.5,
basis_beta = c("bs", "OBasis", "fourier"), df_beta = 5, degree_beta = 3,
insert = c("FALSE", "X", "basis"), method = c("trapezoidal", "step"))
|
n |
sample size. |
p |
number of the components in the functional compositional data. |
m |
size of unpenalized variables.
The first |
intercept |
whether to include an intercept.
Default is |
interval |
a vector of length 2 indicating the time domain. Default is |
n_T |
an integer specifying length of the equally spaced time sequence on domian |
obs_spar |
a percentage used to get sparse ovbservation. Each time point is with
probability |
discrete |
logical (default is |
SNR |
signal to noise ratio. |
sigma |
variance used to generate the covariance matrix
|
Nzero_group |
an even integer specifying that the first |
rho_X, rho_T |
parameters used to generate correlation matrices. |
Corr_X, Corr_T |
character string specifying correlation structure bewteen components and between time points, respectively.
|
range_beta |
a sorted vector of length 2, specifying the range of coefficient
matrix |
beta_c |
value of coefficients for beta0 and beta_c (coefficients for intercept and time-invariant predictors). Default is 1. |
beta_C |
vectorized coefficient matrix.
If missing, the program will generate |
theta.add |
logical or integer(s).
|
gamma |
for the high-level mean groups, log(p * gamma) is added on the "non-normalized" data w_i before the data are converted to be compositional. |
basis_beta, df_beta, degree_beta |
|
insert |
a character string sepcifying method to perform functional interpolation.
If |
method |
a character string sepcifying method used to approximate integral.
|
The setup of this simulation follows
Sun, Z., Xu, W., Cong, X., Li G. and Chen K. (2020) Log-contrast regression with
functional compositional predictors: linking preterm infant's gut microbiome trajectories
to neurobehavioral outcome, https://arxiv.org/abs/1808.02403
Annals of Applied Statistics.
Specifically, we first generate correlation matrix X.sigma
for components of a composition
based on rho_X
and Corr_X
, and correlation matrix T.sigma
for time points based on rho_T
and Corr_T
. Then, the "non-normalized"
data w_i=[w_i(t_1)^T,...,w_i(t_{n_T})^T]
for each subject are generated from multivariate normal
distrubtion with covariance CovMIX = sigma^2 * kronecker(T.Sigma, X.Sigma)
, and
the mean vector is determined by theta.add
and gamma
.
Each w_i(t_v) is a p
-vector for each time point v =1,...,T_n.
Finally, the compositional data are obtained as
x_{ij}(t_v) = exp(w_{ij}(t_v))/sum_{k=1}^{p} exp(w_{ik}(t_v)),
for each subject i=1,...,n, component of a composition j=1,...,p and time point v=1,...,n_T.
a list including
data |
a list of observed data,
|
beta |
a length |
basis.info |
matrix of the basis function to generate the coefficient curves |
data.raw |
a list consisting of
|
parameter |
a list of parameters used in the simulation. |
Zhe Sun and Kun Chen
Sun, Z., Xu, W., Cong, X., Li G. and Chen K. (2020) Log-contrast regression with functional compositional predictors: linking preterm infant's gut microbiome trajectories to neurobehavioral outcome, https://arxiv.org/abs/1808.02403 Annals of Applied Statistics
1 2 3 | Data <- Fcomp_Model(n = 50, p = 30, m = 0, intercept = TRUE, Nzero_group = 4,
n_T = 20, SNR = 3, rho_X = 0, rho_T = 0.6,
df_beta = 5, obs_spar = 1, theta.add = FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.