Description Usage Arguments Details Value Author(s) References Examples
Simulate data for log-contrast model with a single set of compositional data.
1 2 3 |
n |
sample size |
p |
number of components in the compositional data |
rho |
parameter used to generate the p*p autocorrelation matrix for correlations among the components. Default is 0.2. |
sigma |
standard deviation for the noise terms, which are iid normal with mean 0. Default is 0.5. |
gamma |
a scaler. For the high level mean component(s), |
add.on |
an index vector with value(s) in |
beta |
coefficients for the compositional variables. |
beta0 |
coefficient for the intercept. Default is 1. |
intercept |
whether to include an intercept. Default is |
The setup of this simulation follows
Lin, W., Shi, P., Peng, R. and Li, H. (2014) Variable selection in regression with compositional covariates,
https://academic.oup.com/biomet/article/101/4/785/1775476.
Specifically, we first generate the correlation matrix among the components
X.Sigma
by rho
with an autoregressive correlation structure. we then
generate the "non-normalized" data w_i for each subject from
multivariate normal distribution with covariance X.Sigma
and mean
determined by add.on
and gamma
. Each w_i is a vector of
length p
.
Finally, the compositional covariates are obtained as
x_{ij}=exp(w_{ij})/∑_{k=1}^{p}exp(w_{ik}),
for each subject i=1,...,n and component j=1,...,p.
A list containing:
y |
a n-vector of the simulated response |
X.comp |
a matrix of the simulated compositional predictors of dimension n*p |
Z |
a matrix of the log-transformed compositional predictors |
Zc |
a matrix of the simulated covariates |
intercept |
whether an intercept is included |
beta |
the true coefficient vector |
Zhe Sun and Kun Chen
Lin, W., Shi, P., Peng, R. and Li, H. (2014) Variable selection in regression with compositional covariates, https://academic.oup.com/biomet/article/101/4/785/1775476. Biometrika 101 785-979.
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.