View source: R/simulate_data_baseline.R
baseline_covariates | R Documentation |
Set parameters to generate correlated multivariate normal data for internal and external patients.
baseline_covariates(
names,
means_int,
means_ext = means_int,
covariance_int,
covariance_ext = covariance_int
)
names |
character vector of variable names. |
means_int |
numeric vector of means for internal patients. Must have same length as |
means_ext |
numeric vector of means for external patients. Must have same length as |
covariance_int |
variance-covariance matrix for generating multivariate normal for internal patients.
Must be square matrix with same number of rows and |
covariance_ext |
variance-covariance matrix for generating multivariate normal data for external patients.
Must be square matrix with same number of rows and |
BaselineObject to build simulated dataset
corr_covs <- baseline_covariates(
names = c("b1", "b2"),
means_int = c(5, 25),
covariance_int = covariance_matrix(diag = c(1, 1), upper_tri = 0.4)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.