Raincloud plots in JASP (3way interaction)
Hi all, I'm trying to get some good raincloud plots for my 3-way interaction. The design is fairly straightforward. Participants provide a rating on a scale five times (Factor Time). Then I have two other between-subjects factor, each with two levels. The thing I cannot seem to achieve is to create raincloud plots where all five points of a participants are connected (via a line).
When I try to make a raincloud plot via the raincloud tab after having done a classical ANOVA I can add Time as a dependent variable and one of the BS factors, but then JASP creates 5 separate plots with two levels (still missing one BS factor).
When I try to do it via descriptives, I can add all levels of the Time factor as well as the two BS factors, but it then still creates five separate plots and the levels of time (for a participant) are not connected.
Does anyone know how I can link the five points of a participants via a line in JASP?
Comments
Hi,
just so that I understand you correctly:
There is one dependent variable: rating
There is one within-participant factor: time (five levels)
And there are two between-participant factors: X and Y (each two levels).
With that, your best option would probably be the following approach
via the new Descriptives submodule for raincloud plots.
rating -> Dependent Variables
time -> Primary Factor
X -> Secondary Factor
Y -> Covariate (because discrete covariates are also supported)
To also connect all five points (levels of the primary factor) for each participant, you can assign the variable that specifies the participant ID in your data frame to the "ID" input field.
IMPORTANT: The descriptives submodule requires your data to be in long format.
However, from your post sounds like that you have your data in wide format, since you seem to enter the five levels of the time factor as separate dependent variables. This might be what gives your five plots.
Here is what a wide data frame looks like (the dependent variable itself has no explicit name):
ID - time1 - time2 - time3 - time4 - time5
97 - 1 - 3 - 4 - 1 - 1
98 - 2 - 2 - 1 - 1 - 3
Here is what the data frame looks like in long format (dependent variable, rating, is explicitly named):
ID - time - rating
97 - 1 - 1
97 - 2 - 3
97 - 3 - 4
97 - 4 - 1
97 - 5 - 1
98 - 1 - 2
98 - 2 - 2
98 - 3 - 1
98 - 4 - 1
98 - 5 - 3
To transform your dataframe from wide format to long format,
you could use this handy tool by Luke Korthals:
https://lukekorthals.shinyapps.io/shiny-data-witch/
Hope this helps! :)
This is a test comment. I just wrote a reply but it need approval first?
I am curious whether this comment will go through.
Well... let me try again.
As I understand, there are the following variables:
dependent Variable: Rating
within-participant factor: time (5 levels)
two between-participant factors: X and Y (each with 2 levels)
participant ID
If I further understand correctly, then your data frame is currently in wide format.
There is not one column for rating and another for time but instead you have five different columns that contain the ratings at each time.
In order to plot your data in the new descriptives submodule for rainclouds, however, you need the data in long format.
Here is a handy tool by Luke Korthals that can transfrom your dataframe from wide to long format
lukekorthals . shinyapps . io / shiny-data-witch /
(Maybe my last comment got removed because of the link?)
Once your data is in long format, you can use the new submodule as follows:
rating -> dependent variable
time -> primary factor
X -> secondary factor
Y -> covariate (since discrete covariates are possible)
ID -> ID
Hope this helps! :)
It should give you a single plot.
However, if this is too cluttered, you could also remove the covariate and duplicate your jasp file.
Then, you could filter out one of the levels of Y in one jasp file and filter out the other level in the other jasp file. Then you have two plots, one for each level of Y.
Ah I overlooked the long format necessity. Thanks for helping me out and pointing me to the handy app!
Are there perhaps other apps that can help me easily transform wide into long format? It seems that the linked app is no longer working, at least it isn't for me. The creater's page also gives a 404 code.
For wide-to-long, you could use an unmentionable application that's similar to JASP, or you could use SPSS, or you could use R.
R