7/25/2023 0 Comments Error bars not at top of graph r![]() The y=IKSI statement tells ggplot2 that the y-axis will reflect the range of numbers in the IKSI variable (which holds all of the means). The x=Practice statement tells ggplot2 to use the levels of the Practice variable for the x-axis. The statements inside aes() set up the important dimensions of the graph. The first statement data=IKSImeans tells ggplot2 to use the dataframe called IKSImeans. The code inside the () set the properties of the first layer. This line calls the function ggplot() and establishes the first layer. Y=IKSI, group=Sequence, color=Sequence))+ We could do this on a single line of code, but for clarity we will break up the code. Note that we need to simulate data for 8 different conditions of the DV (it’s a 2x4 design). Using the concepts from the previous section we can build the simulated data using the following code. We will also predict an interaction, where the effect of practice is larger for the short than long sequences. ![]() The predictions are that typing speed should increase with practice, and that typing speed should be faster for the short than long sequences. The dependent variable will be mean inter-keystroke interval (IKSI), which is a measure of the time taken to type each letter in the sequence. Participants practice the sequences over 4 blocks of 100 trials each (50 short sequences, 50 long sequences). The first is Sequence length, half of the sequences are 5 letters long, and half are 10 letters long. There are two within-subjects independent variables. 20 participants are given the opportunity to practice sequences of random strings of letters. This example will go through all of the steps from creating a design with specific predictions for performance in each condition, simulating and analyzing the data, producing a graph of the data.Ĭonsider a simple sequence learning experiment.
0 Comments
Leave a Reply. |