View source: R/synthesise_data.R
export_empty_cor_matrix | R Documentation |
A function to export a correlation matrix with the required variables as a csv file.
export_empty_cor_matrix(
marginals,
folder_path,
file_name = "correlation_matrix.csv",
create_folder = TRUE
)
marginals |
The marginal distributions |
folder_path |
Folder to export to. |
file_name |
(optional) file name, Default: 'correlation_matrix.csv' |
create_folder |
Whether the folder should be created, Default: TRUE |
This function will export an empty correlation matrix
as a csv file, it will contain all the necessary variables including
dummy variables for factors. Dummy variables for factors may contain
a missing category to represent missing data. Correlations should be
added to the empty CSV and the imported using the
import_marginal_distributions
function.
Correlations should be supplied using rank order correlations.
The correlation matrix should be symmetric and positive semi definite.
No return value, called for exportation of files.
import_marginal_distributions
import_cor_matrix
## Not run:
marginals <- import_marginal_distributions()
export_empty_cor_matrix(
marginals,
folder_path = tempdir()
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.