recodeCat2cat: function to create a categorical variable based on a...

Description Usage Arguments Value Author(s)

Description

This function will simply create a new categorical variable with different categories than an already created categorical variable, the number of categories for the new variables will be usually less than the number in the predefined categorical variables by merging some of the categories of the predefined variables. The information should be specified in the template excel sheet that was imported as data frame. Information also include the variable name and the name of categories.

Usage

1
recodeCat2cat(input, output, n)

Arguments

input

the list of dataframes based on imported template excel file with information about the variable name, categories and the categories from the another (predefined) categorical variable.

output

the dataset that contain the already created categorical variable

n

the number of observation in the synthetic dataet

Value

a list of one variable that is simply the new categorical variable with categories's probabilities based on the categories of a previuosly defined categorical variable. Also the missing fraction is based on the fraction missing in the orginal continuopus variable.

Author(s)

Levi Waldron and Ragheed Al Dulaimi


raldulai/Episim documentation built on May 26, 2019, 10:02 p.m.