Exercise 8 - More practice with the GSS#

Accept the exercise

Parts 1-3 of this exercise should involve fairly minor modifications of graphs you’ve already done (feel free to use the ones in the solution, but make sure you understand the code!)

Part 4 requires you to map data to a map.

Part 1: Education, political view, and climate change#

Adapt one of the Exercise 7 solutions to quickly plot the interaction between degree and polviews for predicting clmtcaus. What are you seeing?


Part 2: Science knowledge and its correlates#

The graphs below ask about how pairs of variables relate to an outcome variable, i.e., they ask you to examine the main effects and the possible interaction. Make sure you interpret what you are seeing in the figure. A sentence or two is sufficient.

2.1#

a. Recall the compound variable science knowledge that you created as part of Exercise 7. How does science knowledge vary as a function of education (degree) and belief in God (god)?

2.2#

What about science knowledge vs. trust in science (consci) and education (degree)?

2.3#

Show how science knowledge varies by party identification (partyid) and belief in god (god). What are you seeing?

Partyid has a lot of levels, so for simplicity, create a variable called partyid_twoway which is “democrat” for partyid levels 0-2 inclusive, and levels 4-6 inclusive for “democrat” For the graph, just plot the republicans vs. democrats thus defined. You can omit levels 3 and 7.

2.4#

What about science knowledge vs. trust in science (consci) and party identification (the partyid_twoway variable you created in part 3)

Part 3#

Visualizing data on a map

3.1#

Show how the science-knowledge (the compound measure you created for Exercise 7) varies for different parts of the US (region) using a US map. There are a lots of packages for vizualizing data on maps. One of them is us_map. Whatever way you choose will probably require that you map region onto individual states. Here is the mapping. You’ll need to create a CSV with this mapping and join it to your data. There should not be any region-to-state mappings hard-coded in your R code.

Note

Bonus+1 if you show what differences in science knowledge look like you for different regions when you control for (i.e., residualize) education (degree) from science knowledge.

3.2#

Find a variable for which there is a more dramatic difference for different parts of the country.