export_empty_cor_matrix: Export an empty correlation matrix

View source: R/synthesise_data.R

export_empty_cor_matrixR Documentation

Export an empty correlation matrix

Description

A function to export a correlation matrix with the required variables as a csv file.

Usage

export_empty_cor_matrix(
  marginals,
  folder_path,
  file_name = "correlation_matrix.csv",
  create_folder = TRUE
)

Arguments

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

Details

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.

Value

No return value, called for exportation of files.

See Also

import_marginal_distributions import_cor_matrix

Examples

## Not run: 
 marginals <- import_marginal_distributions()
 export_empty_cor_matrix(
   marginals,
   folder_path = tempdir()
  )

## End(Not run)

RESIDE documentation built on Oct. 18, 2024, 1:07 a.m.