Editing Statistics and Statistical Programming (Winter 2017)/Problem Set: Week 7

From CommunityData

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 7: Line 7:
::(d) It's important to be able to import tables directly into your word processor without cutting and pasting individual cells. Can you export the ''output'' of your table? There are a bunch of functions you can use to do this. I used the "xtable" package but I think that <code>write.table()</code> and Excel would do the job just as well.
::(d) It's important to be able to import tables directly into your word processor without cutting and pasting individual cells. Can you export the ''output'' of your table? There are a bunch of functions you can use to do this. I used the "xtable" package but I think that <code>write.table()</code> and Excel would do the job just as well.
: '''PC2.''' At the [[Community Data Science Workshops]] we had two parallel afternoon sessions on Day 1. In my session, there were 42 participants. In Tommy Guy's session, there were only 19. The next week (Day 2), we asked folks to raise their hands if they had been in Tommy's session (14 did ) and how many had been in mine (31 did). There was clearly attrition in both groups! Was there ''more'' attrition in one group than another? Try answering this both with a test of proportions (<code>prop.test()</code>) and with a <math>\chi^2</math>. Compare your answers. Is there convincing evidence that there is a dependence between instructor and attrition?
: '''PC2.''' At the [[Community Data Science Workshops]] we had two parallel afternoon sessions on Day 1. In my session, there were 42 participants. In Tommy Guy's session, there were only 19. The next week (Day 2), we asked folks to raise their hands if they had been in Tommy's session (14 did ) and how many had been in mine (31 did). There was clearly attrition in both groups! Was there ''more'' attrition in one group than another? Try answering this both with a test of proportions (<code>prop.test()</code>) and with a <math>\chi^2</math>. Compare your answers. Is there convincing evidence that there is a dependence between instructor and attrition?
: '''PC3.''' [https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/2NJV2P Download this dataset that was just published on "The Effect of Images of Michelle Obama’s Face on Trick-or-Treaters’ Dietary Choices: A Randomized Control Trial."] The paper doesn't seem to have even been published yet so I think the abstract is all we have. We'll come back to it again next week.
::(a) Download and import the data into R. I needed to install the "readstata13" package to do so.
::(b) Take a look at the codebook if necessary. Recode the data on being presented with Michelle Obama's face and the data on whether or not kids picked up fruit. we'll leave it at that for now.
::(c) Do a simple test on whether or not the two groups are dependent. Be ready to report those tests. The results in the paper will use linear regression. Do you have a sense, from your reading, why your results using the coding material we've learned might be different?


== Statistical Questions from OpenIntro §6 ==
== Statistical Questions from OpenIntro §6 ==
Please note that all contributions to CommunityData are considered to be released under the Attribution-Share Alike 3.0 Unported (see CommunityData:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following CAPTCHA:

Cancel Editing help (opens in new window)