Dummy variable codes for these categories can be seen in the table below:
Code1 | Code2 | Code3 | Code4 | Code5 | Code6 | |
Country | 1 | 0 | 0 | 0 | 0 | 0 |
Rock | 0 | 1 | 0 | 0 | 0 | 0 |
Rap | 0 | 0 | 1 | 0 | 0 | 0 |
Jazz | 0 | 0 | 0 | 1 | 0 | 0 |
Classical | 0 | 0 | 0 | 0 | 1 | 0 |
None | 0 | 0 | 0 | 0 | 0 | 1 |
This is an example of how dummy variables work. Whenever the value of code1 is 1, we know that the type of music is rock. Note that the value of code1 for all other types of music is 0.
This same logic works for other column names (or variables). Whenever the row value for a column is 1, we know that the corresponding music type is active. Note that for every row, there is only '1' present.
Please let me know if you have any doubts related to this. I will be happy to help. Happy learning!
can I have question 8 answered with shown work. 8. Construct dummy variable codes for favorite type of music, as measured by these categories: country, rock, rap, jazz, classical, none. Show your...