Teaching R on my MSc Health Psychology course

Link to full open access book

One of the things I’ve become slightly obsessed with in recent years is moving my data analysis away from SPSS and over to R. And if I’m obsessed with something, you can be damn sure I’ll be inflicting this on my students too. For the past three years, I’ve embedded R into my From Cell to Society module, which explores biopsychosocial interactions in health. That makes it a great space for working with large, real-world datasets.

As part of the module, students work with a pared-down version of the Scottish Health Survey and use regression analysis to test a biopsychosocial theory of their own design. To support this, I’ve written a companion Quarto book that walks students through the key skills of data wrangling, visualisation, and analysis in R. It’s inspired by the excellent #psyteachr resources used at the University of Glasgow, but tailored to our own teaching context, datasets, and assessments.

You can explore the book for yourself at https://richclarkepsy.github.io/NS7154_25/. It’s open for anyone to use, borrow from, or adapt for your own teaching and learning. I hope it proves a useful companion on your coding journey.

I built an app to cheat at wordle

Wordle sucks, I hate it, so I built an app to cheat at it.

I explain in my R book how we can use the wordle to practice our data skills, in particular filtering a dataset. This app is just the completed exercise rendered in a Shiny App. Like most apps I make, it works most of the time (it gets a bit buggy with double letters). It’s by no means as good as someone that can spell and do the wordle, but I am not one of those people so it’s better than me at least.

Here’s how it works.

Open the app here: https://vr7ney-richard-m0clarke.shinyapps.io/wordle_app/

Have a version of the wordle open. I suggest: https://wordleunlimited.org/

Click the Generate Starting Word button until you find a word that you like.

Input this in the wordle and get the feedback.

In this case we know that the word starts with an R, there is an E somewhere in the word and A, C and T are not in the word.

We then feed this information (in lower case, no spaces) back into the app and click the generate next guess

This then shows the top ten words ordered by frequency in the dataset.

Pick one of these and then it back to the wordle app for feedback for the word.

Back to the app to update, adding the grey letters, removing the orange and adding the new green.

Then back to the wordle.

Back to app (lots of steps I know, but its still more appealing to me than actually solving the wordle)

Down to three choices now, fingers crossed!

Damn it, stupid game (also stupid screenshotter). Think I can take it form here.

Yes, I know, 5 is not great but I didn’t have to think at all (apart form all the coding I did) and that’s priceless.

If you’d like to learn to cheat at the wordle for yourself (and learn some R) check out the exercise I set my students here: https://richclarkepsy.github.io/NS7154_25/day2.html#exercise-2-solve-the-wordle-with-code-optional

If you want to see this idea done properly by a far superior coder/mathematician check out this stunning video by 3blue1brown:

Managing allergy-related COVID-19 vaccine hesitancy: A multi-methods analysis of practitioner notes and referral outcomes

When COVID-19 vaccines were first rolled out in the UK, most people were eager to get protected. But for a small group, the decision wasn’t straightforward.

For people with allergies (or who believed they had allergies vaccination) came with an extra layer of fear. Media stories about allergic reactions, early mixed messages from regulators, and confusing information online left many people asking a simple but deeply personal question: “Is this safe for someone like me?”

Our recent study looked at how NHS healthcare professionals responded to exactly these concerns during the COVID-19 vaccine rollout, using real-world referral data and clinicians’ notes from an interim vaccine allergy advice service in Herefordshire and Worcestershire

What we found tells an important story about trust, anxiety, and how frontline decision-making really works in public health emergencies.

What was the problem?

Early in the rollout, the UK briefly paused use of the Pfizer-BioNTech vaccine for people with a history of severe allergies. Although this guidance was quickly reversed, the initial message travelled far, and the correction didn’t. As a result, GPs, pharmacists, and vaccination teams were suddenly faced with large numbers of people worried that:

  1. past allergic reactions (sometimes from childhood) put them at high risk
  2. ingredients like polyethylene glycol (PEG) could cause anaphylaxis
  3. vaccination centres wouldn’t be able to help if something went wrong

In areas without a formal NHS allergy service (which is common), this created a bottleneck: Who actually needs specialist care, and who can be safely vaccinated in the community?

What did we study?

We analysed anonymised records from 326 people referred to a COVID-19 vaccine allergy advice service between 2021 and 2022. The data included referral forms completed by healthcare professionals, notes documenting patient concerns and the decisions made by GPs, pharmacists, and multidisciplinary specialist teams

Crucially, these weren’t research interviews, they were real clinical notes, written under pressure during a live public health response.

What did we find?

Very few people actually needed hospital vaccination

Despite widespread fear, almost no one was advised not to be vaccinated. Around 1 in 4 people were advised to vaccinate as normal in primary care. Another 3 in 10 were advised to vaccinate with simple precautions (e.g. antihistamines, longer observation). Only 0.9% were advised to vaccinate in hospital as a necessity. About 1 in 5 cases were reviewed by a specialist multidisciplinary team, most of whom still recommended community vaccination

This matters because it shows that severe vaccine allergy is rare, even among people who are worried they are high-risk.

Allergy histories were often complex or unclear

Healthcare professionals faced a huge range of allergy stories. These included severe reactions decades earlier, self-diagnosed allergies with no clinical confirmation, reactions to food, cosmetics, antibiotics, insect stings, or unrelated vaccines  and anxiety-related symptoms that felt physical and frightening

In many cases, clinicians had to decide without clear test results or consistent records. That uncertainty often led to referrals, not because vaccination was unsafe, but because clinicians wanted to be cautious and supportive.

Anxiety played a major role, for patients and perhaps for professionals too

The notes revealed how strongly anxiety shaped decision-making.

Some people described intense fear of vaccination, even after being reassured it was safe. Others wanted vaccination but only if it happened in hospital, or only after another conversation with a trusted GP.

Healthcare professionals were often trying to balance respecting patient fears, avoiding unnecessary medicalisation and keeping vaccination moving during a public health emergency

In some cases, symptoms reported after vaccination were likely linked to anxiety rather than allergy, something the World Health Organization describes as immunisation stress-related responses.

Why does this matter beyond COVID-19?

mRNA vaccines are now being developed for a whole range of immunisations, future pandemics, and treatments. If allergy-related fears aren’t addressed clearly and consistently, the same patterns of hesitancy will repeat.

Perhaps the most important insight from this study is that vaccine hesitancy wasn’t driven by rejection of science. Many of the people in these records wanted to be vaccinated. What they wanted first was reassurance, from someone they trusted, that it was safe for them.

Understanding and supporting that process is essential if we want future vaccination programmes to be effective, equitable, and humane.

This blog post is based on Clarke et al. (2025). Managing allergy-related COVID-19 vaccine hesitancy: A multi-methods analysis of practitioner notes and referral outcomes. Click the link to read the full open access paper.

I was mentioned in The Psychologist

Yes, that magazine that turns up once a month and we never read! And I can’t remember exactly why or how this happened, but I’m counting it as an academic output (because they are few and far between at the moment!). Marcus Munafò reached out to ask how I used open data as a research methods teacher. In the article titled Why aren’t we doing more with open research? Marcus talks about the gap between broad support for open research in principle and how patchy its uptake still is in practice, especially once you factor in time pressure, incentives, and training. My small contribution focused on how open datasets, shared code, and transparent workflows can make research methods feel more concrete, less intimidating, and more honest for students. I’ve reproduces this below but make sure to read the full article here: Link

I’m constantly seeking ways to show how what might seem like ‘dry’ statistical and methodological content can lead to genuinely meaningful, real-world impact. To me, open research is the best way to achieve this. Showing students real data and real ethical considerations, presented alongside a well-written article, is unparalleled in demonstrating that the skills they are developing could soon lead to similarly impactful research of their own.

However, finding suitable datasets or protocols for these topics can be incredibly time-consuming. I often encounter studies with incomplete metadata, unclear variables, or insufficient documentation, making their analyses difficult to interpret, even for me, let alone for students. A central database of open protocols, complete with transparent ethical outlines, participant recruitment details, and well-labelled datasets, would save hours of searching and preparation.

Of course, creating and maintaining such a resource is not without challenges. Ensuring privacy, addressing consent requirements, and curating consistent metadata standards all demand significant effort, and incorporating tags that allow us to find the materials we need for our teaching. For this reason, I commend Marcus and his colleagues for undertaking such an endeavour. I believe it’s worth it. In particular, this resource will be valuable for both A-level students and undergraduate students.

By integrating high-quality, open materials into our teaching, we can empower future researchers to view openness not merely as an abstract ideal, but as a practical, transformative approach that enhances both the rigour, reach and accessibility of psychological science.

Making Research Methods Less Scary

Teaching research methods can be a real challenge, not because the concepts are inherently difficult, but because for many students their first encounter with data analysis software feels intimidating. For a long time, SPSS was the default (and often the only) option, but as open science practices have become more mainstream, a wider range of tools has become genuinely viable for teaching. I increasingly found that SPSS was slowing sessions down and adding unnecessary stress, pulling attention away from the underlying logic of analysis. Over the past couple of years, I’ve therefore shifted the core of my undergraduate teaching to JASP. It’s free, intuitive, and allows students to focus on understanding research design and statistical reasoning rather than wrestling with software menus. In practice, this change has led to clear improvements in both confidence and engagement.

Alongside the software switch, I’ve been rethinking how I deliver content. Instead of long, uninterrupted lectures, I now chunk material into shorter sections and pair them with bite-sized video clips alongside clear textual explanations. Hopefully this approach is more supportive and makes our sessions feel less like a firehose of information. The viewing numbers on these smaller clips are certainly better than when I used to put up the full lectures.   

I’ve put these resources together in an open access book (written using rmarkdown) available online at richclarkepsy.github.io/NS5108/. Please feel free to adapt and use as you wish, and if you’d like to collaborate on future version please do get in touch (rclarke8@glos.ac.uk).

Non-pharmaceutical interventions and risk of COVID-19 infection: survey of UK public from November 2020–May 2021

This study was a nightmare, the survey was hosted on LimeSurvey (which remains one of the least intuitive platforms I’ve ever used), suffered badly from survey bloat, and had zero analysis plan going in. Recruitment was a constant struggle, which led to some frantic learning about web-scraping email addresses and then more frantic learning about GDPR rules. I accidentally miss-emailing about 500 people in Yorkshire with the wrong details thanks to a mail-merge fail. All of this happened during the pandemic, when everything already felt stressful and uncertain. The fact that a solid, publishable paper came out of it at all still feels like a small miracle. My supervisors Nick and Merlin, who were genuinely excellent throughout a very tough period of the pandemic.

The paper looked at whether everyday behaviours people were encouraged to adopt during the pandemic. Were things like wearing face coverings, social distancing, handwashing, and avoiding crowds actually linked to a lower risk of reporting COVID-19 infection? Using a very large UK survey collected between late 2020 and mid-2021, we found pretty clear patterns: people who reported wearing face coverings, keeping their distance from others, avoiding crowded places, and washing their hands when they got home were less likely to report having had COVID-19. Other behaviours that were heavily promoted at the time (like cleaning surfaces or avoiding touching your face) didn’t show the same protective pattern, which likely reflects a mix of recall bias and the messy reality of self-reported data.

Read the full open access paper here: Francis, N. A., Becque, T., Willcox, M., Hay, A. D., Lown, M., Clarke, R., … & Little, P. (2023). Non-pharmaceutical interventions and risk of COVID-19 infection: survey of UK public from November 2020–May 2021. BMC Public Health, 23(1), 389.

COVID-19 vaccination beliefs, attitudes, and behaviours among health and social care workers in the UK: A mixed-methods study

This is probably my favourite of my COVID-era papers. It was one of those rare projects where everything moved at speed: we started planning in early January, had data coming in by early February, analysis wrapped up by March, and a pre-print out by April. Sadly, that’s also where things slowed to a crawl, with the paper eventually taking until the following January to make it through to publication.

I also feel incredibly lucky to have worked with the NHS Race and Health Observatory on this project. The team were thoughtful, collaborative, and grounded in real-world impact in a way that made this feel like research that actually mattered. I’d strongly encourage anyone interested in health inequalities or applied public health research to spend some time looking at the work they do.

What follows is a brief summary of what we found, but it’s worth saying upfront that this paper is as much about systems, workplaces, and trust as it is about individual vaccine decisions.

This paper explored COVID-19 vaccination beliefs, attitudes, and behaviours among health and social care workers in the UK during the very early stages of the vaccine rollout. Using a mixed-methods approach, we combined a large national survey (nearly 2,000 participants) with in-depth interviews to understand not just who was or wasn’t getting vaccinated, but why. Health and social care workers were prioritised for vaccination because of their elevated risk, yet uptake varied considerably across roles, sectors, and demographic groups.

One of the clearest findings was that access and workplace context mattered a great deal. Social care workers were more likely than healthcare workers to report not being offered a vaccine at all, often because of fragmented employment arrangements and unclear responsibility for vaccine delivery. We also found that feeling pressured by employers to get vaccinated was associated with lower uptake, while feeling positive about one’s organisation as a place to work was associated with higher uptake. In other words, trust, autonomy, and organisational culture played a central role alongside individual beliefs about safety and effectiveness.

The paper also highlighted important ethnic inequalities. Black African and Black Caribbean health and social care workers were more likely to decline vaccination and expressed greater concerns about safety, side-effects, and trust in institutions, shaped by both historical and contemporary experiences of racism in healthcare. The key takeaway was that vaccine hesitancy in this context was not about ignorance or irrationality, but about access, trust, and lived experience. Addressing these issues requires structural solutions, culturally informed engagement, and genuine partnership with organisations like the Race and Health Observatory, whose involvement made this work both possible and meaningful.

You can read the full open access paper here: Bell, S., Clarke, R. M., Ismail, S. A., Ojo-Aromokudu, O., Naqvi, H., Coghill, Y., … & Mounier-Jack, S. (2022). COVID-19 vaccination beliefs, attitudes, and behaviours among health and social care workers in the UK: A mixed-methods study. PloS one17(1), e0260949.

Climate change risk communication: a vaccine hesitancy perspective

This paper is a short commentary that aim is to draw lessons from vaccine hesitancy research and apply them to climate change risk communication. Our central argument was that achieving net-zero carbon emissions will fail if it focuses only on technological solutions and ignores public trust, engagement, and behaviour. Drawing on experience from COVID-19 vaccination programmes, we highlight three key lessons: the need to actively engage the public rather than assume compliance, the importance of trusted messengers (such as healthcare professionals and community leaders), and the value of humanising abstract risks through stories and lived experience rather than relying solely on statistics. In essence, the piece argues that climate action is as much a social and psychological challenge as a technical one, and that policymakers would do well to treat climate communication with the same care and attention as public health vaccination campaigns.

Update: We wrote it in the winter of 2020, and I’ve got to say I feel we nailed some of the net-zero lack of trust narrative that we’ve seen in recent years.  

Read the full article here: Paterson, P., & Clarke, R. M. (2021). Climate change risk communication: a vaccine hesitancy perspective. The Lancet Planetary Health5(4), e179-e180.

Parents’ and guardians’ views and experiences of accessing routine childhood vaccinations during COVID-19

When the first COVID-19 lockdown began in England, there was growing concern that routine childhood vaccinations might quietly fall by the wayside. Messages such as “stay at home” and “protect the NHS” were essential for controlling the pandemic, but we were worried about an unintended consequence: parents being unsure whether routine childhood vaccinations were still going ahead, or feeling anxious about attending GP practices. The aim of this study was simple but urgent: to understand how parents and guardians were experiencing access to routine childhood vaccinations during the earliest phase of the pandemic, and what barriers were getting in the way.

To do this, we used a multi-methods approach, combining a large online survey with follow-up interviews. Over 1,200 parents and guardians of children aged 18 months or undertook part in the survey during April–May 2020, right in the middle of the first lockdown. We then conducted in-depth telephone interviews with a smaller group to explore their experiences in more detail. The study was framed by the COM-B model of behaviour change, which helped us think systematically about parents’ capability (knowledge and understanding), opportunity (practical access), and motivation to vaccinate.

We found that most parents strongly believed that vaccinating their children on time was important, even during a pandemic. However, many faced practical and informational barriers that made this harder than it should have been (admin! It’s always admin!). These included confusion about whether vaccination services were still running, difficulties booking appointments, cancelled or unclear reminders, and fears about catching COVID-19 when attending GP practices. Importantly, these challenges were not evenly distributed. Parents from lower-income households and from minoritised ethnic backgrounds were significantly less likely to be aware that routine vaccinations were continuing.

The key message from the study is that motivation wasn’t the problem, the systems and communication were. When parents did attend appointments, they often reported feeling reassured by the safety measures in place. The findings pointed to clear, actionable solutions: consistent national messaging, proactive invitation and reminder systems, and transparent communication from GP practices about what to expect. These lessons matter not only for COVID-19, but for future public health emergencies where maintaining routine care is essential. The full paper sets out these findings and recommendations in detail.

Bell, S., Clarke, R., Paterson, P., & Mounier-Jack, S. (2020). Parents’ and guardians’ views and experiences of accessing routine childhood vaccinations during the coronavirus (COVID-19) pandemic: A mixed methods study in EnglandPloS one15(12), e0244049.

Parents’ and guardians’ views on the acceptability of a future COVID-19 vaccine

As the first wave of the COVID-19 pandemic unfolded, it became clear that developing a vaccine would only be part of the challenge. Even before any vaccine was available, questions were already emerging about whether people would be willing to accept it, particularly when it came to vaccinating children. The aim of this study was to understand how parents and guardians in England felt about a future COVID-19 vaccine, what might encourage acceptance, and what concerns could act as barriers.

To do this, we carried out a rapid multi-methods study during the first national lockdown in spring 2020. We combined a large online survey of over 1,200 parents and guardians of children aged 18 months or under with follow-up interviews. This approach allowed us to measure overall levels of vaccine acceptability while also capturing the reasoning and uncertainty behind people’s views at a time when very little was known about vaccine safety, effectiveness, or timelines.

Overall, most parents reported that they would be likely to accept a COVID-19 vaccine for themselves, with slightly lower acceptance for vaccinating their children. Protection of family and others was a strong motivator, while concerns centred on safety and the speed of vaccine development. Importantly, lower acceptance was more common among parents from lower-income households and from Black, Asian and minority ethnic backgrounds. The findings highlight that hesitancy was driven less by opposition to vaccines and more by trust and uncertainty, pointing to the need for clear, transparent communication to avoid reinforcing existing health inequalities.

Bell, S., Clarke, R., Mounier-Jack, S., Walker, J. L., & Paterson, P. (2020). Parents’ and guardians’ views on the acceptability of a future COVID-19 vaccine: A multi-methods study in EnglandVaccine38(49), 7789-7798.