| variable | description |
|---|---|
| purch_rating | Purchase rating (sliding scale 0 to 100, with higher ratings indicating greater perceived likelihood of purchase) |
| price | Price presented for item (range £5 to £100) |
| ppt | Participant identifier |
| condition | Whether items are seen on a model or on a white background |
Identifying grouping structure
In this lab, you will start to build skills that you’ll use again and again for the next five weeks (and really, for the rest of your data analysis career!).
You’ll practice identifying the grouping structure within a given dataset and thinking about what kind of variability each grouping variable contributes.
In the ten questions below, you’ll apply the tools you saw in the lectures to five different group-structured datasets.
(Next week, you’ll apply new tools to these same five datasets to understand their grouping structures even more deeply!)
- Create a new .Rmd file for this week’s exercises.
- Save it somewhere you can find it again.
- Give it a clear name (for example,
dapr3_lab01.Rmd). - In the first code chunk, load the packages you’ll need this week:
tidyverse
Clothing
Read in the dataset located at https://uoepsy.github.io/data/dapr3_mannequin.csv and name it clothing.
RQ: Are people more likely to purchase clothing when they see it displayed on a model, and is this association dependent on item price?
Thirty participants were presented with a set of pictures of items of clothing, and rated each item how likely they were to buy it. Each participant saw 20 items, ranging in price from £5 to £100. 15 participants saw these items worn by a model, while the other 15 saw the items against a white background.
- What grouping variable(s) does this dataset contain?
- How many levels/different values does each grouping variable have?
- Which grouping variable(s) contribute reproducible/manipulated/controlled variability?
- Which grouping variable(s) contribute random/non-manipulated/non-controlled variability?
Monkey status
Read in the dataset located at https://uoepsy.github.io/data/msmr_monkeystatus.csv and name it monkey.
RQ: How is the social status of monkeys associated with their ability to solve problems, while controlling for the difficulty of the problem?
| variable | description |
|---|---|
| status | Social status of monkey (adolescent, subordinate adult, or dominant adult) |
| difficulty | Problem difficulty ('easy' vs 'difficult') |
| monkeyID | Monkey name |
| solved | Whether or not the problem was successfully solved by the monkey |
Researchers have given a sample of Rhesus Macaques various problems to solve in order to receive treats. Troops of Macaques have a complex social structure, but adult monkeys tend can be loosely categorised as having either a “dominant” or “subordinate” status. The monkeys in our sample are either adolescent monkeys, subordinate adults, or dominant adults. Each monkey attempted various problems before they got bored/distracted/full of treats. Each problems were classed as either “easy” or “difficult”, and the researchers recorded whether or not the monkey solved each problem.
Laughs
Read in the dataset located at https://uoepsy.github.io/data/lmm_laughs.csv and name it laughs.
RQ: How is the delivery format of jokes (audio-only vs. audio AND video) associated with differences in humour ratings?
| variable | description |
|---|---|
| ppt | Participant identification number |
| joke_label | Joke presented |
| joke_id | Joke identification number |
| delivery | Experimental manipulation: whether joke was presented in audio-only ('audio') or in audiovideo ('video') |
| rating | Humour rating chosen on a slider from 0 to 100 |
These data are simulated to imitate an experiment that investigates the effect of visual non-verbal communication (i.e., gestures, facial expressions) on joke appreciation. Ninety participants took part in the experiment, in which they each rated how funny they found a set of 30 jokes. For each participant, the order of these 30 jokes was randomised for each run of the experiment. For each participant, the set of jokes was randomly split into two halves, with the first half being presented in audio-only, and the second half being presented in audio and video. This meant that each participant saw 15 jokes with video and 15 without, and each joke would be presented with video roughly half of the time.
Driving music
Read in the dataset located at https://uoepsy.github.io/data/drivingmusicwithin.csv and name it driving.
RQ: How is the type of audio being listened to associated with driving speeds?
| variable | description |
|---|---|
| pid | Participant identifier |
| speed | Average speed driven on route (mph) |
| music | Music listened to while driving (classical music / rap music / spoken word) |
These data are simulated to represent data from a fake experiment, in which participants were asked to drive around a route in a 30mph zone. Each participant completed the route three times (i.e., “repeated measures”), but each time they were listening to different audio (either speech, classical music or rap music). Their average speed across the route was recorded.
Mindful decline
Read in the dataset located at https://uoepsy.github.io/data/lmm_mindfuldecline.csv and name it mindful.
RQ: Is engaging in mindfulness associated with slower cognitive decline as people get older?
| variable | description |
|---|---|
| sitename | Site identifier |
| ppt | Participant identifier |
| condition | Whether the participant engages in mindfulness or not (control/mindfulness) |
| visit | Study visit number (1 to 10) |
| age | Age (in years) at study visit |
| ACE | Addenbrooke's Cognitive Examination score. scores can range from 0 to 100 |
| imp | Clinical diagnosis of cognitive impairment ('imp' = impaired, 'unimp' = unimpaired) |
The researchers recruited a sample of 20 participants at age 60, and administered the Addenbrooke’s Cognitive Examination (ACE) every 2 years (until participants were aged 78). Half of the participants complete weekly mindfulness sessions, while the remaining participants did not.