187k views
3 votes
Data In this assignment you will be using an extract from RAND Health Insurance Experiment dataset, available directly in R through sampleSelection package. Part 0 in the homework template script loads the data and makes necessary changes to it, including filtering only some of the 1 variables/years, as well as adding some new variables to be used in our regressions?. The key variables of interest are as follows:

User SStanley
by
7.8k points

1 Answer

5 votes

Answer: While a lot of information in here will be helpful, it is not in a tidy format. This is because, each variable is not in a separate column: Each column currently includes year and the type of coverage. We want to use each piece of information separately later when we visualize and analyze these data. We need to first pivot the data longer, and then separate the years from the insurance types.

User Lucidbrot
by
8.5k points