Assessment 1
PS923 - Methods and Analysis in Behavioural Science
Autumn Term 2024 (updated: 2024-11-03)
• This assessment counts for 36% of your overall grade.
• Submission Instructions: Submit your solution as one html or pdf document containing both R code, R output, figures, and written text (i.e., full sentences) to Tabula as “Assessment 1”, by midday (12 noon), Wednesday, 27th November 2024.
• Please use RMarkdown to create the document.
• Important: Your document should be called YOUR-STUDENT-ID_a1 (followed by the correct file ex- tension). Please also add your student ID to the top of the document. To enable anonymous marking, please refrain from using your name in either the document script. or the file name.
• Your text does not need to contain references (i.e., references to scientific papers).
General Guidelines
There are two tasks. Your answers should have two separate sections for each task, one immediately after the other.
In the first section, write out your answers using complete sentences, as you would for the results section of a paper. Include descriptive statistics in the text, tables or figures, as appropriate. Tables and figures should be of publication quality (i.e., fully labelled, etc.). Integrate inferential statistics into your description of the results. Your answers might be quite short. Given the validity of the statistical analysis, the first section will play the main role for your mark.
The second section should include the complete R code that you used and its output. Add comments (using a #) to explain what the code does. The code should show all of the commands that you used; enough to replicate exactly what you did (I will be copying and pasting code to run checks, so make sure that works). You can include additional figures in the second section that you used to explore the data, which you do not wish to include in the first section. I will use the second section to help identify the source of any mistakes. For practical reports and papers you would only submit the first section; thus the first section (for each task) should stand alone without requiring the reader to refer to the second section.
To help ensure that the instructions about the answer format are clear, before turning to your assignment tasks, we first provide an example question and an answer that covers the key aspects. Note that the example answer shows both sections, as is required from you. (Thus, your solutions should consist of 4 parts: Task 1 Section 1; Task 1 Section 2; Task 2 Section 1; Task 2 Section 2).
Example Question
Does mere exposure to a stimulus improve its attractiveness? In an initial stage, participants were exposed to a series of pseudowords. Words were exposed for very short durations with a mask. (Pilot work established that participants were unable to report whether or not a word was presented before the mask in these conditions.) In a second phase, a mixture of the old, exposed, pseudowords and new, previously unseen, pseudowords were presented. Participants could view each word for as long as they liked before rating their liking for the word on a 1-10 scale. Using the data set mere_exposure .csv, test the hypothesis that mere exposure increases the attractiveness of pseudowords.
Example Answer
Section 1 (example)
To investigate whether exposure to a word improves its attractiveness, 32 participants took part in an experiment in which their main task was to rate the attractiveness of pseudowords on a 1-10 scale. Before the main task, participants were shown half of the pseudowords for a very short duration so that they could not perceive them consciously. Figure 1 shows the distribution and means of the attractiveness ratings and suggests that pre-exposed pseudowords (i.e., those shown briefly before the main task) were rated as more attractive than new, previously unseen, pseudowords. We analysed the attractiveness ratings using an ANOVA with a single repeated-measures factor exposure (old versus new). The difference in ratings (difference = 1.82, SE = 0.12) was significant, F (1, 31) = 228.33, p < .0001.
Figure 1 . Attractiveness ratings of pseudowords as a function of prior exposure. Points in the background show the raw data (overlapping points are offset on the x-axis), black points in the foreground show the mean, error bars show 95% within-subjects confidence intervals.
Section 2 (example)
library("tidyverse")
library("afex")
library("emmeans")
# Read in the data and have a look at it.
mere_exposure <- read_csv("mere_exposure.csv")
glimpse(mere_exposure)
#> Rows: 32
#> Columns: 3
#> $ id <dbl> 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, ~
#> $ old_liking <dbl> 7.4, 6.5, 6.8, 7.8, 6.9, 9.2, 6.2, 7.9, 6.5, 9.1, 7.6, 8.6,~
#> $ new_liking <dbl> 5.6, 5.4, 3.4, 5.2, 6.1, 8.0, 4.4, 6.1, 3.1, 6.4, 6.1, 7.8,~
# Reformat the data and look at the summary stats
me_tidy <- mere_exposure %>%
pivot_longer(cols = -id, names_to = "Exposure", values_to = "Attractiveness")
str(me_tidy)
#> tibble [64 x 3] (S3: tbl_df/tbl/data.frame)
#> $ id : num [1:64] 1 1 2 2 3 3 4 4 5 5 ...
#> $ Exposure : chr [1:64] "old_liking" "new_liking" "old_liking" "new_liking" ...
#> $ Attractiveness: num [1:64] 7.4 5.6 6.5 5.4 6.8 3.4 7.8 5.2 6.9 6.1 ...
me_tidy %>%
group_by(Exposure) %>%
summarise(mean = mean(Attractiveness),
sd = sd(Attractiveness))
#> # A tibble: 2 x 3
#> Exposure mean sd
#> <chr> <dbl> <dbl>
#> 1 new_liking 5.74 1.34
#> 2 old_liking 7.56 1.01
# Plot the data as a pair of histograms
ggplot(me_tidy, aes(Attractiveness)) +
geom_histogram() +
facet_wrap(~Exposure)
# Carry out ANOVA and contrast old with new
(a1 <- aov_ez(id = "id", dv = "Attractiveness", me_tidy, within = "Exposure"))
#> Anova Table (Type 3 tests)
#>
#> Response: Attractiveness
#> Effect df MSE F ges p.value
#> 1 Exposure 1, 31 0.23 228.33 *** .377 <.001
#> ---
#> Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
pairs(emmeans(a1, "Exposure"))
#> contrast estimate SE df t.ratio p.value
#> old_liking - new_liking 1.82 0.12 31 15.110 <.0001
# Code for plot that is presented in the main report (Section 1)
afex_plot(a1, "Exposure", error = "within",
factor_levels = list(Exposure = c("Old", "New")),
data_arg = list(cex = 3.5, color = "darkgrey"))
Task 1 Evaluation of a simulation
Although each of us is different, it is often sensible to base our expectations of other’s perceptions on our own perceptions (e.g., of whether something is worthwhile). This raises important research questions (in applied fields such as marketing): if a person values something highly (or finds it useful), then to what extent are they likely to expect others to value the same thing highly (or find it similarly useful)?
Here we consider an example where individuals who are interested in buying a new house (yet to be built!) perceive the worth of a simulation that aims to show them what it would be like to walk around inside the new house.
To rate the simulation app, the participants are asked to use it and rate the product on two scales: how useful they found the simulation, and how much they would be willing to pay to use the simulation again if considering another house. They were also asked how they reckoned that someone else (a stranger) would rate the simulation app on these scales.
The file house_sim .csv contains simulated data about perceived values, where the participants were ran- domly split into two groups to perform. different tasks (variable Task). In the WTP group, the participants reported how much they would be willing to pay to use the app (from 0 to £100) when considering an alternative house, and what they thought that a stranger would be willing to pay for the app after having once experienced it. In the Usefulness group, the participants rated how useful they found the app (on a scale of 0 to 100) for themselves (variable Participant) and how they thought that others would rate it (variable Stranger). The file also includes which rating was performed first (Sequence) and the participant identifiers (variable Pid).
Please analyse the data using a linear regression model. The main research questions are whether (a) ratings for oneself predict expectations about strangers, and (b) whether they do so equally for both groups (i.e., level of Task factor). Present the results as you would in a paper, using APA format. In other words, describe your statistical model and results and describe the conclusions with regards to the research questions. In the first section of your answer for this task, include only one figure (which may contain multiple panels), with an appropriate figure caption.
Task 2 Student accommodation
Imagine a student at the early stage of considering whether to rent a property (i.e., before they have choice forced on them!). Perceptions of value will often depend on many factors; some are purely personal (e.g., colours and decor). In this case, we will consider an aspect which is numerical and where most people would agree on the ordering with respect to that component: the floor space of the bedroom, where the larger the value, the better the property is in that (one) regard. As there are many aspects to consider when renting, that one aspect may not dominate the perceived worth; there will often be a lot of noise in the data. One research question on this topic is whether the objective value (i.e., the amount of floor space, regardless floor space of other properties) or the comparative rank (i.e., floor space relative to other properties seen recently) is a better predictor of subjective value.
Imagine a set of 6 properties, 4 of which have less than 14mˆ2 of floor space, one has exactly 14mˆ2, and one property 20mˆ2 of floor space. In this case, the rooms with 14mˆ2 and 20mˆ2 of space both have a high comparative rank (of 2 and 1, respectively). However, the room with 14mˆ2 has a medium objective value whereas the room with 20mˆ2 has a high objective value. If, in the option list, the 20mˆ2 room were replaced by an option with 16mˆ2 of space, then it would still have the best comparative rank despite no longer having such a high objective value. Or, by making the distribution of attribute values in the set even more extreme (replacing it by a room with an even larger space), the objective value and comparative rank could be pitted against each other more strongly.
The file accommodation .csv contains data from a (simulated) factorial experiment that could be used to investigate how the objective values and comparative ranks play into valuation. Participants were presented with pictures and statements about the properties (including the floor space values). The type of rank (or value) was manipulated, either comparative or objective; in each case toward having a low, medium, or high rank.
There were two types of student valuer: undergrad and postgrad. Participants’ perceptions were obtained by eliciting willing-to-pay (wtp) values (in £, per week); this is the dependent variable.
Please analyse the data using an ANOVA (e.g., using afex) and present the results as you would for a paper, using APA format. In other words, describe your statistical model and results and describe the conclusions with regard to the research question. Be careful not to draw unwarranted causal conclusions. In the first section for this task, include only one figure (which may contain multiple panels), with an appropriate figure caption.