r studio-PSYC30013

1 PSYC30013 Research Methods for Human Inquiry Exam: Semester 1, 2022 Available: 14 June 2022 at 8am AEST Due: 17 June 2022 at 11:59pm. Absolutely no late exams accepted so submit as you go! Questions: 30 Word count: 2000 Total marks: 65 Pages: 14 Hello everyone! This is the description for the exam, which is due on Canvas on Friday June 17th, 2022 at 11:59pm. You’ll need to submit a Word-knitted version of the completed R Markdown file found in this zip file, according to the following instructions: 1. Rename the document called exam.Rmd as studentID-exam.Rmd. (Replace studentID with your student ID number). This is your R Markdown file, where you’ll be putting all your code and answers. Replace “Your name, Student ID” in the header of the R Markdown file with your name and student ID. (Keep the quotes) 2. While we encourage collaboration in tutorials and learning in general, you should not be collaborating with anybody AT ALL for this assignment. That means sharing code privately or publicly; even talking in the abstract about problems will effectively be collusion. You should be completing it independently, with no help from any other person in any capacity. Of course, as always, you are free to use any of the resources from the class to help you, and you’re also free to google or look anything up that you like (as long as you aren’t asking anybody, including anybody on discussion boards, specific questions about this assignment, and everything you write is in your own words). Different people will be getting different datasets and thus may have different answers even on the same questions anyway. 3. Plagiarism check is enabled and you can check the similarity report on your submission. In previous years we have found people who tried to cheat, so please don’t risk it! That said, understand that we will not be naively looking at the overall % figure: with this sort of assignment a certain amount overlap is inevitable, so don’t worry if you get what looks like a high % score. Probably most people will. We will be using the plagiarism check for the parts of the assignment where we’d expect some variability, and to give a general sense of the overall gestalt. 4. Complete all of the problems below in the R Markdown document. Do not change any of the arguments to the code chunks, like the names of the code chunks or where it says echo=FALSE or whatever. If a problem asks you to display a tibble or variable so it shows up in the knitted version, make sure that you do as the marker cannot evaluate it without seeing it, and if they can’t see it then they won’t be able to award you points for it! Remember that to display a tibble (or any variable) you just type its name on a line of its own within the R chunk. 5. I’ve structured this so that, as much as possible, questions do not build on each other. That means that if, say, you can’t get Q5 then you can still get Q6. Try to do all of them. 6. Go for partial credit! Many of these questions have some form of partial credit possible. What that means is that if it is asking for some R code, break down the problem into pieces. Even if you can only do some of the pieces, or do them part of the way, that will be worth something. [Note that there is no question-by-question rubric available because designing one would mean giving away the answers. In general we will give full credit for responses that correctly address all of the parts of the question.] Short answer questions (SAQs) are also worth partial credit and are generally asking for some thoughtful interpretation. If it is based on a previous graph or test you’ve done, if you did the first part wrong but discuss it well, you can still get most or all points for the SAQ part. If your code does not run but you want to include it for possible partial credit, just comment it out (using the # sign) so that it shows up in the knitted document. If you include a lot of commented-out code and some is correct and some isn’t, we will not give you credit for the commented-out code; put the thing in there that you think is the closest to the correct answer, don’t just include everything. 2 7. We are not overly worried about to what decimal place you round answers to and unless the problem explicitly specifies what you should round to, you will not lose credit for this unless you round so much that your answer is impossible to discern (e.g., don’t round p-values to the nearest integer!). Similarly, you will not lose points for trivial presentation things like using parentheses instead of commas around statistical references, as long it’s clear. That said, for those who want a guideline, I’ll suggest that you follow APA format or round p-values to three decimal places, degrees of freedom to one, and test statistics and probabilities to two. 8. If the question is an SAQ, it specifies a word count. Unfortunately, there is no way that I know of in R Markdown to do a word count. You need to either calculate it from the knitted document, or type up your answer in Word1 and then cut and paste it into the R Markdown file. (Please put your answer in between the word ANSWER and [Word count: XX]; needless to say, those two bits do not count towards your word count.) The word counts I’ve specified in each question are designed to give you a guideline about the number of words you should need answer completely and correctly. So don’t feel like you must use all of the words; if you can answer it fully with less, that’s fine. It’s okay to go over the word limit for individual questions as long as the total word count for all of the questions is under 2200 words (i.e., 2000+10%, with the standard penalty if it is 2000 + 10% or higher2; there is no penalty for having fewer words than 2000-10%). Also, if a question hasn’t specified a word count then you don’t need to include it in your total word count; these are questions that require very few words so it’s not worth the effort. 9. There is no word count for code chunks. Word count only applies to the SAQs. Remember to report your total word count for the assignment as a whole at the top of the document. Your total word count is the sum of the word counts for all of the SAQs. 10. You’ll be turning in the knitted output of your R Markdown file. We prefer that you knit to Word but if you can’t get Word to knit then html is okay. In the worst case, you can turn in the completed Rmd file. We highly, highly recommend that you knit as you go: (a) knitting can identify problems in your code that you would have otherwise missed; and (b) you do not want to get close to the deadline and think you’re done only to find that you’re having troubles knitting. Save yourself the panic and knit often. 11. Similarly, you can turn in the exam multiple times, so please turn it in even before it’s perfectly polished. That will save you last-minute panic or computer issues. Also, take a screenshot for proof of having turned it in just in case you need it. If you do not submit your exam by the due date we cannot accept it no matter what so just submit as you go! We will only mark the most recent submission so you lose nothing by doing so. The story For the exam, we return to Bunnyland and Otherland one year later! When we last saw them things had come to a tentative conclusion but substantial challenges remained. Could people from both lands manage to work together to solve their food problem Would tensions flare Would the fragile peace get disrupted Would they be able to grow enough food that nobody went hungry You’ll find answers to these questions in the vignettes below. We’ll visit each of our friends and see what they’re doing and you’ll be able to help them with their statistics one last time. Enjoy! * * * 1 I know different software calculates word count in slightly different ways, so we are using Word as the standard. 2 The penalty is as detailed in the student manual: “10% of the total marks available for a given assessment task will be deducted for every 10% that the word count exceeds the word limit specified for the task”. So up to 2,199 results in no penalty. Between 2,200 and 2,399 is a 10% deduction, between 2,400 and 2,599 is 20%, and so forth. 3 Punk music The last year has been a good one for Flopsy. They have embraced their non-binary identity and decided to change their name and pronouns to something that felt more like “them”. They are now known as Flaye and have formed a goth punk band along with Sissily the snake. They’ve spent much of the last year touring around Bunnyland and Otherland with their band, which is called Mental Limit Theorem. They play in four venues: Bunnystadia, Star Venue, Zed Zone, and Markov Chain. Flaye and Sissily are curious about whether more people tend to attend their concerts at any of the venues, or whether all four of them have about the same average attendance. Fortunately they have tracked the concert attendance, which can be found in the tibble called df. It has been loaded for you. Each row consists of one concert, and there are three columns: concert: unique identifier for each concert venue: one of the four possible venues (Bunnystadia, Star Venue, Markov Chain, or Zed Zone) attendance: the number of people in the audience at that concert Their research question is whether on average attendance is the same at each of the four venues. Your job is to use your R and statistics knowledge to find the answer to this question. Q1 [2% of total marks] First, as always, let’s visualise the data. In the code chunk for this question make the appropriate figure visualizing the attendance for each of the venues. Your figure should show each of the individual data points as well as a different geom displaying a summary for each venue, a colour scheme (other than the default) with different colours for each venue and the colours of the data points matching the geom, no legend, and of course a title, informative axis labels, and a nice theme. Q2 [2% of total marks] There are several assumptions you could test, but for the sake of simplicity we will focus on the normality assumption (you may presume that homogeneity of variance holds). Evaluate normality using the appropriate test. In 30 words or less, report the statistical test and indicate what the results of the code reveal (including stats reference). Was the assumption violated How can you tell Q3 [4% of total marks] Run the appropriate statistical test to evaluate the research hypothesis given Q2. Report on the results in 60 words or less. In your report, don’t worry about including descriptive statistics but do include an explanation of which statistical test you used, what the predictor and outcome variables were, the appropriate stats reference, the effect size and its interpretation, and the interpretation of this data in terms of the research question. Q4 [4% of total marks] Perform post-hoc pairwise tests and in 40 words or less, report the tests and which venues (if any) had significantly lower attendance than others, along with their p-values. You do not need to report the non-significant venues or their p-values. END OF SECTION 4 Art Not much has changed for Cuddly Paws, although all the drama made her think even more about what she wanted out of life. She hadn’t enjoyed all of the tension and worry but had enjoyed how everything had forced her out of her shell a bit and deepened her interactions with people. Though she still preferred the comforts of art over people, she did expand out of her comfort zone enough to begin giving her art away. It turns out that many people enjoy her art, and some of them react by sending her letters to say so. Some of the letters are purely kind and complimentary, while others contain some kind of question or request, like asking her if she would paint in a certain style or show her art in a gallery. No letters contain both compliments and requests. Cuddly Paws spent a few weeks keeping track of these letters and eventually found herself wondering if the type of letter was different depending on who was sending it (bunnies or bears). The data can be found in the table called artTable, which has been created for you in the code chunk for Q5. It is also shown below. Cuddly Paws would like to know if bunnies and bears differ in the distribution of compliments and requests in their letters, based on this data. Q5 [3% of total marks] Run the appropriate statistical test to evaluate Cuddly Paws’ question and report on the results in 80 words or less. In your report, don’t worry about including descriptive statistics, but do include an explanation of which statistical test you used and why, the appropriate stats reference, and the interpretation of this data in terms of the research question. Don’t worry about effect size. END OF SECTION 5 Meatball Cafe The opening up of relations between Bunnyland and Otherland has been great for Gladly. He hadn’t realised how hard he found it as one of the few bears in a land full of bunnies until things changed. He ended up making fast friends with Super Size, who also had struggled with a similar alienation being so large and different. He was still large and different, but with Gladly that didn’t seem to matter, and the two bonded over one of their favourite topics: food. Now that they were growing so much more food, both Gladly and Super Size’s persistent hunger was assuaged, and the two friends turned their thoughts to how they could share their love of food with others. One day Gladly had an idea: they could start a restaurant! It was ideal for both of them. They could be around friends all day, and make use of all of the fantastic new foods being grown. Before long, their restaurant was the social hub linking Bunnyland and Otherland. Located on the border, Meatball Cafe was a vibrant place of food, conversation, and laughter. No longer did Gladly wonder what he wanted to do with his life: he knew! And best of all, there were meatballs every day. Before long they started wondering what factors were associated with more sales, so they tracked this information over the course of the spring. The data can be found in the dm tibble, which has been loaded. Each row corresponds to the data from one day. There are four columns: day: What day it was (day1 = September 1, day91 = November 30) temperature: The maximum temperature that day in degrees C happiness: The happiness of the person serving that day (0 = very sad; 50=very happy) meatballs: The number of meatballs sold on that day Their research question is what factors (if any) predict how many meatballs are sold: the temperature that day, the happiness of the server, and/or an interaction of the two. Your job in the next few problems is to use your R and statistics knowledge to find the answer to this question. Q6 [7% of total marks] Run the appropriate statistical test to evaluate the research hypothesis, assuming for now that no assumptions have been violated. Report on the results in 170 words or less. In your report, don’t worry about including descriptive statistics but do include an explanation of which statistical test you used, the predictor and outcome variables, the stats reference, and the interpretation of this data in terms of the research question. Include effect size and a description and interpretation of all the significant unstandardised coefficients except the interaction (whether it is significant or not). Don’t worry about calculating or reporting standardised coefficients. Q7 [6% of total marks] There are four things we discussed in lectures that you should check for the test you just ran. Check them in the four code chunks (the order does not matter). For each, indicate what checked, what the results indicate, and how you can tell. Use no more than 180 words total for this entire question. Q8 [5% of total marks] Given the results in Q6 and Q7, what would you do to answer this research question You may use the code ch

💡 Buy the answer for only $12 Get it now →

unk to make any figure(s) you think necessary to figure out what is going on. You do not need to perform any additional tests or analyses, but you should say what you think is going on as well as you would do and why if you were in this situation in real life. This could include describing any additional analyses that you would perform and how they would support different conclusions. Use no more than 240 words. [Note: this is a challenging question and you are being asked to critically think about the data and the rest of the process. Marks depend primarily on the clarity, appropriateness, and thoroughness of your discussion. There are multiple ways to earn full credit.] END OF SECTION 6 New leaders The path toward integrating the people of Bunnyland and Otherland was not easy, but was helped a lot by the burgeoning friendship between LFB and Rainbow the unicorn. LFB will always remember Rainbow as her first friend in Otherland. For her part, Rainbow has found LFB to be a delightful companion and loves her fresh views and honest, straightforward manner. The trust between the two of them carried the day several times when tensions were high. As a result, when it came time for the next elections, there was a groundswell of support for the idea of electing LFB and Rainbow together to be leaders of their respective lands. LFB and Rainbow were more surprised than anyone, but found that they truly enjoyed being able to guide their people and work together to make things better. It has now been five months since they were elected and Rainbow and LFB would like to know whether people still support them as leaders. They therefore commission a poll which surveys 200 different people, 100 from Bunnyland and 100 from Otherland. 50 people from each land were asked to rate their degree of support for LFB, and 50 were asked the same question about Rainbow; nobody was asked both questions. This data can be found in the ds tibble, which has been loaded for you. Each row consists of one person. There are four columns: id: Random code corresponding to each person who took the survey location: Whether that person lives in Bunnyland or Otherland leader: Whether they were asked about LFB or Rainbow support: Level of support for the leader they were asked about (0=none; 100=full) LFB and Rainbow want to know whether the two of them have the same level of support, whether support varies by location, and whether there is any interaction between these factors. Q9 [3% of total marks] First, as always, let’s visualise the data. In the code chunk for this question make a bar plot showing the support for each person. You should have two panels, one corresponding to Bunnyland and one for Otherland. Within each panel, the two bars should be semi-transparent and of different colours (not the default) and should how the mean support for LFB and Rainbow respectively (with error bars corresponding to standard error) and individual data points in the same colour as the bars. Your figure should also have no legend, a title, informative axis labels, and a nice theme. Q10 [6% of total marks] For simplicity let’s assume that all the assumptions of the relevant statistical test have been met, so you don’t have to evaluate them. Instead, run the appropriate statistical test to evaluate LFB and Rainbow’s research question and report on the results in 120 words or less. In your report, don’t worry about descriptive statistics but do include an explanation of which statistical test you used, the appropriate stats reference, and the interpretation of this data in terms of the research question. Don’t worry about effect size or any post-hoc tests. END OF SECTION 7 Psychology Following the events of a year ago, Bunny achieved her dream and became a psychologist. She also grew to be good friends with Foxy, having been impressed by the empathy and courage that became visible during her adventures in Otherland. That adventure and the bond with Bunny gradually led Foxy to come out of her shell more, sharing more about her upbringing in far-away Foxland. Upon graduating with her degree, Bunny and Foxy decided to open up a psychological practice, with Bunny as the psychologist and Foxy as the manager. Soon their practice — called Hearts and Minds — became central to helping the people of Bunnyland and Otherland begin to process the years of slow trauma caused by increasing hunger, fear, and uncertainty. And both Bunny and Foxy grew greatly in confidence, having faced so many of their biggest fears (including statistics and R). Foxy is still worried a lot, though, and most recently she has started to worry that she is not as efficient or good as Bunny at being a therapist. She therefore decides to use her skills to help answer the question. She is interested in how many minutes total each patient took before they felt they were cured and no longer needed to be seeing a psychologist. The dataset dp, which has been loaded for you already, contains a list of the last 40 of each of the patients each of them have had who finished all of their sessions. Each row is one of the patients, and there are the following three columns: patient: unique identifier for each patient person: the person acting as psychologist for that patient (Bunny or Foxy) time: the total time in minutes they spent in sessions before leaving Foxy wonders if she and Bunny are significantly different in terms of how long their patients take to feel cured, on average. She hopes to use this knowledge to infer whether she is as good as Bunny. Q11 [1% of total marks] Check the assumption of normality in the code chunk below. In 40 words or less, report the statistical test and indicate what the results of the code reveal (including stats reference(s)). Was the assumption violated How can you tell Q12 [7% of total marks] Run the appropriate statistical test to evaluate the research question and report on the results in 170 words or less. In your report, include descriptive statistics (means, not sd ) and effect size (including interpretation) as well as an explanation of which statistical test you used and why, the appropriate stats reference, and the interpretation of this data in terms of the research question. What does this result indicate, if anything, about whether Foxy is as good of a psychologist as Bunny, and why END OF SECTION 8 Adventurers His missions to Otherland sparked in Doggie a taste for adventure: while all the other people started settling in and working together, he grew increasingly restless. Moreover, he realised that some early life trauma meant he would probably not be able to trust the Others for a while, so he decided it would be best to heal on his own. He spent more and more time wandering around in the hills nearby, wondering what he wanted to do with his life. On one of these trips he came across Kevin and Kevin Clark (the string), who were feeling similarly at sea. They got to talking and realised that what they all wanted was to strike out somewhere new — to see what there was to see in the mountains and valleys beyond both Otherland and Bunnyland. They thus decided to give it a try together. Before long the three of them gained a reputation far and wide as almost mythical adventuring figures. One of their favourite things about their new life is that they sleep far better than they ever have before. Perhaps this is because of so much travelling, perhaps because they are eating better than they used to, perhaps both, perhaps neither. In order to investigate this they decide to track all of these variables to see if there are any relationships between them. The data is in the tibble dd, which has been loaded for you. Each row corresponds to one night and it has three columns: night: the night in question sleep: the amount of time Doggie spent sleeping in hours distance: the distance in km Doggie travelled the previous day food: the number of kilojoules Doggie ate the previous day Q13 [4% of total marks] Calculate a Pearson correlation between distance and food and report on the results in 60 words or less. In your report, use the appropriate stats reference and interpret what this result suggests about the relationship between distance and food. How does the correlation you found relate to the R2 you would obtain if you ran a regression with distance as the outcome and food as the predictor Q14 [5% of total marks] Their main question is about how these variables are related to sleep and specifically which of them matter, if any. For this we are going to do model selection. For simplicity let’s assume that all assumptions are met. In the code chunk below, create the following three models (you don’t have to show the output, just create them). 1. modelSD: sleep is the outcome variable, distance is the only predictor 2. modelSF: sleep is the outcome variable, food is the only predictor 3. modelSDF: sleep is the outcome variable, distance and food are both predictors, but there is no interaction Q14a. Perform model selection between these three using AIC or BIC (either is fine) as the complexity penalty. In no more than 15 words, state which model is preferred and why (you don’t need to report the AIC/BIC results, just interpret them). Q14b. In no more than 85 words, explain why we use something like AIC or BIC to do model selection, rather than just picking the model that has the highest R2. Q15 [6% of total marks] In 130 words or less, report the best-fitting model from Q14, including a description of which statistical test you used, your predictor and outcome variables, the appropriate stats references, and the interpretation of the research question in terms of this data. Don’t report effect size or the interpretation of the unstandardised coefficients but do discuss the relative strength of the predictors and why the size of the values of the undstandardised and standardized coefficients are different. END OF SECTION 9 Statistical consulting Finally, we get to Shadow and Little Blue. This semester showed both of them how much they love statistics and R, and it showed everyone in Bunnyland and Otherland how valuable statistics and R are when making decisions. As a result, they decided to open a statistical consulting business. Their job is both to collect data but also to answer anybody and everybody’s statistical questions. They are very happy. What follows are a few of the questions they’ve gotten recently. Shadow and Little Blue have gone on leave, so see if you can answer them as well! Q16 [5% of total marks] Q16a. Which of the following statistical references is impossible For (i) and (ii) indicate your answer by reporting A or B. Use your knowledge about each test statistic and how it is related to degrees of freedom and p-values to answer this question. You do not need to do any coding. (i) A. χ2(3) = 75.3, = .936 or B. χ2(1) = 1.44, = .231 (ii) A. t(44) = 0.67, p = .003 or B. t(35) = -2.68, p = .011 Q16b. For each answer in Q16a, explain it by describing intuitively what the test statistic captures and thus why you chose the answer you did, making reference to the degrees of freedom and/or p-value as appropriate. Use no more than 130 words in total for this question. Q17 [4% of total marks] Q17a. For each of the following equations, indicate which figure on the right it corresponds to. (Note: you do not need to code anything for this problem; just use your understanding about what the various coefficients mean, and pay special attention to the positive and negative signs). (i) = 1.51 + (ii) = 1 + 2 + 12 + (iii) = 21 1.52 + (iv) = 21 + 2 312 + Q17b. For each answer in Q17a, explain why you chose it by discussing the relevant aspects of the equation and how they map onto the figure. You do not need to discuss every single part of the equation and the figure, only the ones that were relevant for distinguishing them. [Note: we are not looking for answers of the form “I ruled out all of the other possibilities, so it must be this one”; although you can mention this if it was part of your reasoning process, each answer must make reference to that equation and the figure in some way]. Use no more than 150 words in total for this question. Q18 [2% of total marks] Quackers has been struggling with statistics – he thinks it is annoying for some reason! – so he decides to ask you one of his questions. “I don’t understand something about non-parametric tests like the Wilcoxon,” he says. “I get that we should use them if assumptions of normality are violated and we can’t use things like the Welch t-test. But why not use them all of the time If they make fewer assumptions, aren’t they better ” Quackers goes on, “I asked Shadow and Little Blue about this but they were in a rush and just muttered something about Type 2 error and power, which I didn’t catch. So can you explain it to me, including what power and Type 2 error has to do with it ” You have 110 words or less. 10 Q19 [3% of total marks] Consider all of the figures below. For each of them, explain whether that figure is or is not consistent with obtaining an F statistic less than one on that data. Your answer for each should be either “is consistent” or “is not consistent” and thus does not contribute to the overall word count. END OF SECTION 11 Psychological Assessment Some of these questions require numerical answers only. Don’t delete anything from the Markdown file aside from the “_______” characters which appears in some places, and which indicates a gap which you should fill. Before attempting these questions please ensure that you have studied: – The Week 11 and 12 lectures – The Week 12 tutorial – The Practice Quiz entitled “Revision Quiz for Section 12.3 of Week 12 (Day 2)” – The questions and solutions contained within the document “pa-exam-prep-prompts- solutions.pdf”, which is linked from the Exam page of the Canvas website for this subject. Q20 [2% of total marks] A treatment for Lazar’s Disease is being developed. People participating in a study were randomly selected to receive either the treatment, or else a placebo. Later on, a test was administered to investigate whether they got the disease. 550 people received the treatment and got the disease 450 people received the treatment and didn’t get the disease 430 people received the placebo and got the disease 570 people received the placebo and didn’t get the disease Produce R code to calculate the Risk Ratio and fill the gaps in the Markdown document. Hint: One gap should be replaced with the word “Placebo”, one with the word “Treatment”, and one with the Risk Ratio. Report the Risk Ratio as a proportion, rounded to three decimal places (e.g. 0.991, or 3.120). Q21 [2% of total marks] Q21a. Which of the following would most increase your suspicion that you are encountering an instance of the file drawer problem A. The small studies in your funnel plot have effects that vary to an implausibly low degree, and are spread roughly evenly on each side of the overall average B. The small studies in your funnel plot have effects that vary to an implausibly low degree, and are not spread roughly evenly on each side of the overall average C. The small studies in your funnel plot have effects that vary to an implausibly high degree, and are spread roughly evenly on each side of the overall average D. The small studies in your funnel plot have effects that vary to an implausibly high degree, and are not spread roughly evenly on each side of the overall average Report A, B, C, or D (and nothing else) in the blank provided on the Markdown file. Q21b. Let’s say you believe you have encountered the file drawer problem. Briefly describe one action you could take to try to ensure that the file drawer problem does not invalidate your meta-analysis. More t

💡 Buy the answer for only $12 Get it now →