W 6311: Social Work Research in Practice II | Week 4Week 4: Data Analysis IConducting statistical analysis can prove an intimidating task for some students. However, statistical analysis is the critic

Homework 3: Transformations and dplyr

Scott Alberts (modified Scott Thatcher)

September 13, 2018

In Fall 2011, Dr. Alberts’ ST AT 376 class did a survey of faculty opinions about teaching writing. Y ou’ll find the original survey in

PDF form on Blackboard with this lab. You can see the data itself, along with a “data dictionary ,” in the accompanying Excel file.

You may want to keep both these open for reference as you complete this homework assignment.

Remember that W ACT is ENG 190, our entry-level writing course, and JINS is the junior-level interdisciplinary course, both of

which are required of all T ruman students, and both of which are intended to improve a student’ s writing skills.

As usual, you should create an R markdown file with the answers to these questions, knit it, and submit a PDF by uploading to

Blackboard.

1. First, load your libraries and load the data set:

a. You’ll want both the tidyverse and readxl libraries.

b. To load the data set, you can use the r ead_excel command, which has he same syntax as the read_csv

command you’ve used before. Make sure you’ve savaed the data file in the same directory as your markdown file.

2. Next, use dplyr commands to create a new data frame named TTFac that satisfies these requirements:

Limit your dataset to those respondents who identifed as T enure-Track (Q26).

TTFac should contain only these variables:

Those about a faculty member ’s comfort with writing (Q8 to Q1 1)

Those about a faculty member’s beliefs regarding student writing (Q18 to Q21)

Demographics (Q23 to Q27)

Create a new variable, J INStoWACT , that calculates the ratio of a respondent’ s answer to Q19 (about WACT

writing) to that Q18 (about JINS writing).

Note that you’ll have to look up the actual variable names using the data dictionary .

3. Use the head and View commands to check that your new data frame looks the way it should.

4. Make a jitterplot comparing TTFac answers about the ef fectiveness of the WACT course Q18) to that of JINS (Q19),

colored by School of respondent Q27. What can you conclude about the general relationship between opinions on W ACT

and JINS? How much can you tell about whether School is related to these opinions?

5. Make a set of side-by-side boxplots that show the variable JINStoWACT broken down by school of the respondent (Q27).

Are there any schools whose view of the impact of JINS compared to W ACT seems especially low?

6. Use dplyr commands to create a table that counts the number of responses from each school.

7. Looking at your table from Question 6, how does is help explain dif ferences in variability in the boxplots from Question 5?