Description Usage Arguments Value Examples
For this methodology we assume that we draw a set of n
independent each
with q_{i} observations.
1 2 3 4 5 6 7 8 9 10 | mvrnorm_corr_gen(
n,
obs,
t,
mu,
sigma,
rho,
corr_str = c("ar1", "compound", "ind"),
zero_trunc = TRUE
)
|
n |
integer scalar representing the total number of individuals |
obs |
vector of length |
t |
vector corresponding to the timepoints for each individual. |
mu |
vector specifying the mean value for individuals. |
sigma |
scalar specifying the standard deviation for all observations. |
rho |
numeric scalar value between [0, 1] specifying the amount of correlation between. assumes that the correlation is consistent for all subjects. |
corr_str |
character value specifying the correlation structure. Currently available methods are \'ar1\', \'compound\', and \'ind\' which correspond to first-order autoregressive, compound or equicorrelation, and independence respecitvely. |
zero_trunc |
logical value to specifying whether the generating distribution should come from a multivariate zero truncated normal or an untruncated multivariate normal. by default we assume that zero truncation occurs since this is assummed in our microbiome setting. |
This function returns a list with the following objects:
df
- data.frame object with complete outcome Y
, subject ID,
time, group, and outcome with missing data
Y
- vector of complete outcome
Mu
- vector of complete mean specifications used during simulation
Sigma
- block diagonal symmetric matrix of complete data used during
simulation
N
- total number of observations
1 2 3 4 5 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.