contact@mightymetrika.com

scdtb Raw Data Plot Part 2

May 20, 2024

Building More Raw Data Plots with scdtb


In scd Raw Data Plot Part 1 we discussed how to use the scdtb shiny app to build some of the single case design plots presented in WWC 5.0. This blog post will build upon part 1 by going over two plots from Small Sample Size Solutions.

Fictional Single Case Design Efficacy of CBT Example


This example is take from Marija Maric and Vera van der Werff's Single-Case Experimental Designs in Clinical Intervention Research. The data is available as the efficacy_of_CBT dataset in the scdtb R package. View data in R below and then download the csv if you wish to follow along.



To plot this data, open the scdtb app by going to mightymetrika.com > Tools > scdtb.  With the app open:

  • click BROWSE...
  • Navigate to find efficacy_of_CBT.csv on your computer
  • Click on the file
  • Click Open


After completing these steps you should see the following screen:



For this example, we will use Anxious as the outcome of interest. As such, we can plot this data by:

  • Enter Anxious as the Outcome Variable
  • Enter time as the Time Variable
  • Enter phase as the Phase Variable
  • Click PLOT DATA


After completing these steps you should see the following screen:




Sleeping Pills and Dizziness Example


The next example is from Onghena's One by one: The design and analysis of replicated randomized single-case experiments. You can view this data as the sleeping_pills dataset in scdtb. Download the data below if you wish to follow-along.




As before, you can begin to plot this data by opening the scdtb app and uploading the data.


Open the scdtb app: 


Once the app is open, upload the data by:

  • clicking BROWSE...
  • Navigating to find sleeping_pills.csv on your computer
  • Click on the file
  • Click Open


After completing these steps you should see the following screen:



Instead of breaking observations up into successive phases as in the previous examples, this data set breaks the observations up into a randomly assigned experimental or control condition. As such, this plot will specify treatment as a Condition Variable.


To plot this data:

  • Enter sever_compl as the Outcome Variable
  • Enter day as the Time Variable
  • Enter treatment as the Condition Variable
  • Click PLOT DATA


August 19, 2024
Mighty Metrika focuses on statistical methods and mathematics for the analysis of small sample size data. As such, the project runs the risk of people with small sample sizes using tools and methods from mightymetrika.com and becoming over confident in their results because they used "small sample size methods." The long term rigorous goal to combat this disservice is to host citizen science projects, include simulation function in R packages, and share simulation results from the literature and from mightymetrika.com tools through blogs. A short and quick way to combat misuse is through the Who Said It Best series. The series will share some of the best warnings from the small sample size statistical literature. In the Conclusion section of Daniel McNeish's paper Challenging Conventional Wisdom for Multivariate Statistical Models With Small Samples he shares a clear and wonderfully worded warning:
June 25, 2024
This is a quick blog post to list some of the essential resources that I needed to get a citizen science app up and running. The app uses: R Shiny PostgreSQL Pool AWS EC2 The post is basically a way for me to bookmark resources that I found useful and also as a way to say thank you to the folks that put these resources up online.
June 10, 2024
In 'mmibain' v0.2.0, the unit tests are passing at the moment, but on r-devel-linux-x86_64-debian-clang it really seems to be hit or miss. I believe that when the test fails it is do to the new BFfe function which is a case-by-case type implementation of ' bain ' for linear models; however, I used a unit test which relies on a synthetic data set where I generated random numbers and then just used the rep() function to group observations by participants. As such, the data generating process does fit the statistical model and sometimes the random data set that is generated does not make it through bain::bain() without error. I have already changed the unit test and corresponding Roxygen2 documentation example on the Mighty Metrika GitHub and this blog post will walk through the new data and model. But just for further context, here is the original code that sometimes runs through and sometimes throws and error.
More Posts
Share by: