Next, generate the membership file with 1,000 members and assign it to the member dataframe. The wakefield package uses specialized functions to generate typical values for each of the specified variables:
- The gender function will generate M, or F with a 50% chance of any individual row being a male or female
- The set.seed(1010) directive guarantees that the results will be the same no matter how many times you run the code
- The r_sample_replace() function will generate a unique member ID with a value from 1 to 1000
- The income, children, employment, level, grad, year, state, and zip_code variables are all randomly generated without supplying any specialized parameters
Open up a new script window, and run the following ...