首页 > > 详细

辅导 PSYCH 306 | Research Methods in Psychology | Semester 1, 2024调试R程序

PSYCH 306 | Research Methods in Psychology | Semester 1, 2024

Instructions for Midsemester Data Analysis Assignment

30% of course grade | Due 2nd May 2024, 23:59pm

Submit by uploading on Canvas

This data analysis assignment is like the R exercises you have worked through in markdown files during labs – the dataset is just larger, there are more analyses to run, and you will need to make your own decisions about which ones to run and how to interpret them.

But you won’t need to do anything you haven’t already done in one of the labs!

Overview of steps

Step 1: Download your individual data file

In the folder “Files” > “Assignment_Datasets” on Canvas, you will find hundreds

of .csv files, each containing a dataset, identified by student UPI (e.g. “jdoe123.csv”).

Locate and download the one corresponding to your UPI. Triple check that you have the right UPI, because you will be marked correct only if the statistical values, plots, and conclusions in your completed assignment are correct for your assigned dataset.

Step 2: Download the Assignment Template markdown file

Download the “assignment_template_PSYCH306.Rmd” file from Canvas. You will complete the assignment entirely within this markdown file.

Step 3: Read the “Dataset Description” and “Overview of Questions and Marks” sections below

Carefully read the description of the study and variables in the dataset, and the list of questions and how many marks are allocated to each. They are on the following pages of this document.

Step 4: Work through the questions

The “assignment_template_PSYCH306.Rmd” Markdown file contains detailed

instructions, and chunks of code and text for you to complete each question in. Write all the R code you use to answer the questions within code chunks in the assignment

Markdown document. Save your work regularly!

Step 5: Knit and submit

When you are finished, “Knit” the completed Markdown file as a Word or PDF file and upload it on Canvas under “Assignments” > “Midsemester Data Analysis

Assignment”. You may resubmit as many times as you like before the deadline.

Dataset Description

These are data from a fictional study looking at the links between video-game playing, problem gambling, depression, and an individual’s real-world social support. The researchers have hired you as a research assistant, given you their dataset, and asked you to investigate!

Participants and study design: Participants were 360 young adults (18-30 years old) in Aotearoa New Zealand. As well as recruiting from the general population, the researchers advertised the study within betting forums and gambling support groups to recruit from populations with high-risk gambling behaviours. In the sample, there are 120 participants with high-risk gambling tendencies, 120 participants with medium-risk gambling tendencies, and 120 participants with low or no tendency towards risky gambling.

Variables: Below is a description of the measures involved in the study. You should consult these descriptions when you are deciding which analyses to run, deciding how to label graphs, and when you are reporting and interpreting the outcomes of analyses.

Variable name

What is it?

How was it measured?

participant_id

The ID number of each participant.

Assigned by

researchers.

gambling_risk

The tendency of each participant towards risky or problematic gambling behaviour, grouped into A_high”, “B_medium”, and C_low

Classified on the basis of responses to a Problem Gambling questionnaire, which assesses current

thoughts and past

behaviours around

gambling and risk-taking.

This study recruited

equal numbers of

participants in each

grouping.

gaming

Frequency with which each participant plays video games, grouped into

A_frequent” (20+hrs per week) and

B_occasional

(2-10hrs per week).

Self-reported by

participants.

genre_preference

Broad genre of video game most preferred by the participant:

.    “COMS” = Competitive Online

Multiplayer Shooter: fast-paced high-challenge games popular in competitive eSports

Self-reported by

participants from these four options.


.    "MMORPG" = Massively Multiplayer Online Role-Playing Game:

narrative and character based

social role-playing games

.    “SPAaction” = Single-player

Action games, often combat- focused

.    “SPPuzzle” = Single-player Puzzle games

expenditure_2022

$ spent on in-game purchases in 2022.

Estimated by

participants.

expenditure_2023

$ spent on in-game purchases in 2023.

Estimated by

participants.

offline_socialising

Number of hours spent socialising offline (face-to-face) in a normal week.

Estimated by

participants.

depression

Depression score from 0 (no signs of depression) to 50 (severe depression).

Scores below 15 are considered in the normal range.

Measured via a

depression inventory

questionnaire, which

assesses depressive

thoughts and symptoms in the past month.

social_support

Quality of participant’s real-world social network (family, friends, colleagues), broadly grouped into “A_strong”,

B_average”, and C_poor”.

Classified by

researchers on basis of a questionnaire which probes the number and strength of the

participant’s real-world social connections.

Sources: These fictional data are loosely inspired by research reported in the following papers. I provide them only in case you are interested in the topic – they are not needed to complete the assignment.

Carras, M.C., Kowert, R., & Quandt, T. (2018) Psychosocial effects of gaming. In “The  Oxford Handbook of Cyberpsychology”, Oxford Library of Psychology. Eds: Attrill- Smith, A., et al.

Delfabbro, P., & King, D. L. (2020). Gaming-gambling convergence: Evaluating evidence for the ‘gateway’ hypothesis. International Gambling Studies, 20(3), 380-392.

Molde, H., Holmøy, B., Merkesdal, A. G., Torsheim, T., Mentzoni, R. A., Hanns, D., ... &

Pallesen, S. (2019). Are video games a gateway to gambling?A longitudinal study based on a representative Norwegian sample. Journal of Gambling Studies, 35, 545- 557.

Zendle, D., & Cairns, P. (2018). Video game loot boxes are linked to problem gambling: Results of a large-scale survey. PloS one, 13(11), e0206767.

Overview of Questions and Marks (total 30 marks)

See assignment template Markdown file for more detailed guidance on each question .

Question 1: Inspecting the data

. 1.1: Complete text block describing variables (1 mark)

Question 2: Is there an association between gambling risk and use of video games?

. 2.1: Show contingency table (0.5 marks)

. 2.2: State name and hypotheses of appropriate statistical test (0.5 marks)

. 2.3: Conduct and report the test (1 mark)

Question 3: Is a preference for competitive online multiplayer games associated with gambling risk?

. 3.1: Show frequency table (0.5 marks)

. 3.2: Conduct and report appropriate statistical test (1 mark)

Question 4: Is there an association between gambling risk and amount spent on in- game purchases in 2023?

. 4.1: Create a box-and-whisker plot visualising 2023 expenditure grouped by gambling risk (1 mark)

. 4.2: Conduct and report appropriate statistical test (3 marks)

Question 5: Across all participants, did in-game spending change between 2022 and 2023?

. 5.1: Calculate the smallest change that would be detectable with 99% power (1 mark)

. 5.2: Create a box-and-whisker plot visualising expenditure grouped by year (1 mark)

. 5.3: Conduct and report appropriate statistical test, including 95% confidence interval (2.5 marks)

. 5.4: Calculate and interpret the size of this effect (1 mark)

Question 6: Is there a positive association between amount of money spent in-game in the last year (2023) and depression scores?

. 6.1: Conduct and report appropriate statistical test (1 mark)

. 6.2: Predict the depression score for a new participant who spent $127 on in-game purchases in 2023 (2 marks)

. 6.3: Plot depression as a function of money spent in 2023, and visualise your model of the relationship (2 marks)

Question 7: Do frequent gamers spend less time socialising offline than occasional gamers?

. 7.1: Create a box-and-whisker plot visualising time spent socialising grouped by gaming frequency (1 mark)

. 7.2: Conduct and report appropriate statistical test (3 marks)

Question 8: Do frequency of gaming and availability of social support affect depression scores?

. 8.1: Create a box-and-whisker plot visualising depression scores grouped by both social support and gaming frequency (2 marks)

. 8.2: Conduct and report appropriate statistical test (5 marks)

Additional information / FAQs

Extensions

To request an extension complete the form. linked under Canvas > Modules > General course info > “How to request an assignment extension” .

How can I get help with the assignment?

.    Ask questions on Piazza. Please don’t share your answers or code for assignment questions – but you are very welcome to discuss points of confusion, ask for

clarification, and post and discuss code from labs.

.    Go to tutors’ office hours (either your tutor or any other) – see course home page on Canvas for times. Note that tutor office hours will not be held during the

midsemester break, or on public holidays.

.    Go to Kate’s office hours – 10am-12pm Thursdays, including during midsemester break.

.    Form. study groups. Although you have different datasets, talking with others will be a very helpful in figuring out the appropriate response to each question.

.    Talk to the statistics tutors in the Science Assistance Room (302-170) – visit the room to see their schedule.

.    The lab in week 6 will include time to discuss the assignment. We recommend you start working on it before then so you know what you want to ask.

.    The end of the Week 5 Lecture 2 lecture contained some information and advice on completing the assignment.

Can I work with others on the assignment? Can I use AI on the assignment?

Discussing the assignment with others is encouraged as long as the final work is your own. Because you have been assigned a dataset that is specific to you, you will often not arrive at exactly the same values or results as other students analysing their datasets. Discussing the assignment questions with AI systems like ChatGPT is also OK. You should not use code or text that other people or AI systems have written in the final submitted document though. When submitting the assignment you will need to sign an academic integrity statement vouching that the final work is your own. Directly using text or code produced by others is a serious breach of academic integrity.

What if I have problems creating the Word file?

The final submitted file must be either a Word or a PDF document that you have

created by “Knitting” the .Rmd markdown file. Try Knitting the document often and early on, as you work on it, so that you can get help via Piazza / tutor email / in lab / office hours if you encounter problems. Submitting as a PDF is fine if you prefer (it looks nicer), though  this tends to throw errors in R unless you install further packages. Do not submit the raw .Rmd markdown file. See Canvas > Modules > General course info > “Knitting troubleshooting page” for common errors.

What if I run the right analysis but make a mistake reporting it, or vice versa?

For the questions that ask you to complete a text block reporting the result of a

statistical test, you will be marked on both the values you report in text and the analysis code you ran to get those values. You will receive full marks only if you report the correct   results and they accurately reflect the output of your analysis code. If you have the correct analysis code but make a mistake in reporting the result in text, you will receive partial marks. If you report the correct result in text but you have not shown your analysis code, or have performed the wrong analysis, you will get no marks for that question. It is therefore very important to make sure all the R code underlying your analyses is in the submitted assignment file.

Do the plots and reports of statistics have to be in APA format?

Yes. When reporting statistical results, you should follow the APA numbers & statistics guidelines on which abbreviations to use (e.g. M for mean, SD for standard deviation), how many decimal places to use (3 for p values, 2 for everything else), etc.

When in doubt about how to report a result, follow the examples that have been given in lectures. For plots, the internal components of the plot should follow APA figure guidelines (see image below). In particular, they should use a simple uncluttered design,  plain white backgroud, have a descriptive title and plain-language labels on the axes (i.e. no R variable names on the plot), and should include a legend if more than one factor is shown on the plot. There is no need for figure numbers or captions. See the end of Week 5 Lecture 2 for more guidance.

Image from: https://apastyle.apa.org/style-grammar-guidelines/tables-figures/figures

What will the plots be marked on? Do they have to look nice? Can I use ggplot?

Plots will be marked on whether they display the correct data, using the correct

graph type (e.g. box-and-whisker plot, histogram), and are formatted generally following the APA guidelines outlined above. You are not expected to use plotting commands not shown in labs, though. E.g. don’t worry about adjusting font sizes or whether axis tick marks fall inside or outside the axes, if we have not demonstrated how to do these things, even if they are listed as APA requirements. You may use whichever plotting commands you prefer. In the labs we have used the default plotting functionality in base R, but if you know how to use the plotting package “ggplot2” feel free to – it allows for greater  flexibility in customising plots, and generally leads to nicer-looking results.

Do I have to use only the code I’ve been taught in labs?

You are welcome to use additional packages or functions that we haven’t covered in labs. For example, maybe you know other ways of creating tables, or manipulating dataframes, or improving the aesthetics of plots – feel free to use these. However, make sure that when it comes to statistical analyses, you run the tests we have talked about in lectures and labs. There are usually many different ways to statistically answer a given research question, but for the purpose of this assignment please stick to the tests we have presented in lectures and covered in labs.

Can I add more code chunks and text to the markdown file?

For “COMPLETE THIS CODE” questions, please complete the code within the

provided code chunk. For other calculations, feel free to add new code chunks if helpful. For “COMPLETE THIS TEXT” questions, please only edit and add text within the green  quote blocks (i.e. sections beginning “>”).

Can I / should I add comments to my code?

Feel free to comment your code (i.e. explain what certain lines are doing, by adding text beginning with "#"). This is not essential but is good programming practice, and may    help us understand your response if it differs from what we are expecting!

Do I need to check assumptions for all statistical tests?

No, only the ones for which the assignment Markdown file prompts you to check and report on assumptions. This doesn’t mean that the other statistical tests don’t make any assumptions about the data – just that we didn’t spend time on them in this course. If you go further in quantitative research, always look up the assumptions of any test before using it.


联系我们
  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp
热点标签

联系我们 - QQ: 99515681 微信:codinghelp
程序辅导网!