+ - 0:00:00
Notes for current slide
Notes for next slide
  • Introduction
  • How I got into this.

R for Clinical Psychology:
Overview and applications

A showcase of how data science can help to develop digital health products







Dr. Chris Gaskell
Clinical Psychologist
2021/12/16 (last updated: 2022-01-03)

`

Chris Gaskell

Clinical Psychologist

Non-Epileptic Attack Disorder Service
Northern Care Alliance NHS Foundation Trust
Manchester, UK

`
  • Introduction
  • How I got into this.

What is it?

Programming language

`

What is it?

Programming language

Statistical computing and graphics

`

What is it?

Programming language

Statistical computing and graphics

Command line interface (no point & click)

`

The command line

2+2
## [1] 4
`
  • A fancy calculator (like spss)
  • key differances is script files (syntax).
    • transparency
    • reproducability

The command line

test = 4+2
test
## [1] 6
`
  • use website to demonstrate functions
    • sqrt
    • round
  • Functions become more sophisticated
  • User definable
  • tricky (no GUI) but highly flexible because of arguments
  • SPSS is less flexible and there is less available for paper trail.

Functions

sqrt(81)
## [1] 9
round(3.14159, digits = 2)
## [1] 3.14
  • R has loads of functions built in.
  • Also can be user defined.
  • Groups of functions are held together within packages.
`
  • Infinate number of functions.
  • Not all about maths and stats.
  • Packages for stats, for communicating information.

A Universe of Packages

`

Reasons to use R

  • Data analysis & statistics
    • Highest functionality, up to date and bug free
  • Data vizualisations (high quality)
  • Literate Programming
  • Data/web products
  • Open source
    • Free
    • Anyone code and contribute
    • Transparency & Replicability

And a supportive online community!

`
  • MLM; advanced meta-analyis; machine learning;
  • Visualiasation is where R really came to the table.
  • Markdown is an accessible mark up language.

Traditional research workflow

  1. Dats stored in MS Excel
  2. Get it into SPSS
  3. Run some analayses
  4. Extract results? (pray they are done right)
  5. Write up in MS Word

Any problems with this?

`

Traditional research workflow

  1. Dats stored in MS Excel
  2. Get it into SPSS
  3. Run some analayses
  4. Extract results? (pray they are done right)
  5. Write up in MS Word

Any problems with this?

lack of integration? difficult to refine?
transparency and reproducability?
The time it takes to go back and repeat steps?
limited functionality and flexibility?

`

R goes past this with literatre programming. Inregrated way to build reports.

R Markdown workflow

  • R offers a very different workflow.
  • Literate programming approach.
    • Embed snippetes of code within a document (then hit run).
    • If the original data changes then the report will change too.
  • HTML is where it gets interesting.
Can all be shared using GitHub
`
  • Don't need to know much html or css. R Markdown is a simple markup language that can handle them both but requires little of either. Packages also do a lot of the work for us.
  • Literate programming
  • Meta-analysis

Data products

`
  • Second part of presentation - data products
  • Relevance for CP

Is the product of psychological therapy changing?

CP delivery has needed to change:

  1. Evidence based practice
  2. Digital innovations
  3. COVID-19

Issues that remain:

  1. High demand
  2. Acceptability
`
  • EBP: Protocols, Standardisations
  • Digital innovations: therapy Apps
  • Delivery: teleconferencing through covid 19
  • A good thing. Effective. Needed. Particularly 1:1.

    • However there will never be enough CPs
    • there will always be people who dont want to see one.
    • Need to consider more innovative ways to make acceptable interventions that can be easily cascaded.
  • Bigger role of different intervention formats (GSH, bibliotherapy, apps, websites, resources)

  • Quality of resources and handouts in NHS are terrible!

Applications of R to digital healthcare

  • There is a need for improving how we cascade information/intervention (both for research and clinical purpposes).

  • Greater quality of information.

  • Data products, resources, worksheets, teaching slides that people actually want to use.

  • R is a good fit because it can produce good quality html products without the need to be an expert in html

  • html is flexible, accessible and lightweight

`
  • Traditionally, this is out the skillset set of a psychologist. But as the digital landscape is developing there is an increasing need to bring it into our thinking, and perhaps remit. NHS mental health service often lack the infrastructure or expertise to think in this way.
  • Psychologists need to start considering innovation around digital delivery because the people in management, who should be thinking about this, wont.
`
`
`

Embed Tweets

`

Embed Videos & Gifs

`

Great data visualization!

`

Which can even me animated

`

Applications

  • Presentations

  • Books

  • Websites

  • Shiny applications

  • Automated Reports

`

Presentations

Clinical teaching about dissociative seizures

Academic teaching about practice based research

`
  • Scribble.
  • Webcam.
  • Panelset.
  • Videos
  • contact cards

Websites

Static webistes:

  • Personal academic websites.
  • Websites for teaching staff and students.
  • Hosting resources.

My dog's website (bit of fun)

Teaching workshop website

My personal site

`

E-Books

Books that are:

  • Polished, professional and interactive
  • Can output to html, MsWord or pdf
  • Protocols & treatment manuals
  • Workbooks & resources for carers and patients.

The Bookdown example

An example book I made earlier for work

`
  • Looks just like an online book.
  • Sidebar contents table
  • Search function
  • Embded images, videos, tweets, downloadable files.

Applications

`

Academic Posters

`
`

Chris Gaskell

Clinical Psychologist

Non-Epileptic Attack Disorder Service
Northern Care Alliance NHS Foundation Trust
Manchester, UK

`
  • Introduction
  • How I got into this.
Paused

Help

Keyboard shortcuts

, , Pg Up, k Go to previous slide
, , Pg Dn, Space, j Go to next slide
Home Go to first slide
End Go to last slide
Number + Return Go to specific slide
b / m / f Toggle blackout / mirrored / fullscreen mode
c Clone slideshow
p Toggle presenter mode
t Restart the presentation timer
?, h Toggle this help
Alt + fFit Slides to Screen
oTile View: Overview of Slides
sToggle scribble toolbox
Esc Back to slideshow