Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Load the GSS.2016 file into R. The run this code: race

Load the GSS.2016 file into R. The run this code:

race <-rep(NA,nrow(GSS.2016)) race[which(GSS.2016$white==1)]<-"white" race[which(GSS.2016$black==1)]<-"black" race[which(GSS.2016$other==1)]<-"other" wb<-rep(NA,nrow(GSS.2016)) wb[which(GSS.2016$white==1)]<-1 wb[which(GSS.2016$black==1)]<-0 wo<-rep(NA,nrow(GSS.2016)) wo[which(GSS.2016$white==1)]<-1 wo[which(GSS.2016$other==1)]<-0 bo<-rep(NA,nrow(GSS.2016)) bo[which(GSS.2016$black==1)]<-1 bo[which(GSS.2016$other==1)]<-0 GSS.2016<-data.frame(GSS.2016,race,wb,wo,bo)

The code appends 4 variables to the GSS.2016 file and creates a new data frame called "GSS.2016" race is a factor variable with levels "white," "black," and "other" wb is a dummy variable. White respondents are coded 1, black respondents are coded 0, and everyone else is coded as missing. This variable can be used to contrast white and black respondents. wo is a dummy variable. White respondents are coded 1, racial other respondents are coded 0, and everyone else is coded as missing. This variable can be used to contrast white and racial other respondents. bo is a dummy variable. Black respondents are coded 1, racial other respondents are coded 0, and everyone else is coded as missing. This variable can be used to contrast black and racial other respondents.

1. Using the newly created data file above, what are the average occupational prestige scores by the new race variable?

2. Do the average occupational prestige scores vary by race? To answer this question, use ANOVA and report the steps of the hypothesis test.

3. How much variation in occupational prestige scores is explained by participant race? How did you get that number?

4. Among the three racial groups, which pairwise comparisons are statistically significant (i.e., results in a p-value of < .05)? How did you determine this? (For this question, assume the variance is unequal by groups and test whether the means are equal)

5. Below is cross-classified data from 500 respondents. Compute a Chi-squared test of association between the two variables. Is education associated with desire for gun reform in the US?

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Chaos, Noise And Fractals

Authors: E Roy Pike, L A Lugiato

1st Edition

1000112101, 9781000112108

More Books

Students also viewed these Mathematics questions