ez (version 3.0-1)

ezDesign: Function to plot the balance of data in an experimental design

Description

This function provides easy visualization of the balance of data in a data set given a specified experimental design. This function is useful for identifying missing data and other issues (see examples).

Usage

ezDesign(
    data
    , x
    , y
    , row = NULL
    , col = NULL
    , cell_border_size = 10
)

Arguments

data
Data frame containing the data to be visualized.
x
.() object specifying the column in data that contains the variable to plot on the x-axis.
y
.() object specifying the column in data that contains the variable to plot on the y-axis.
row
Optional .() object specifying a variable by which to split the data into rows.
col
Optional .() object specifying a variable by which to split the data into columns.
cell_border_size
Numeric value specifying the size of the border seperating cells (0 specifies no border)

Value

  • A printable/modifiable ggplot2 object.

Details

The function works by counting the number of rows in data in each cell of the design specified by the factorial combination of x, y, row, col variables.

See Also

ANT, ANT2, ezANOVA, ezBoot, ezBootPlot, ezCor, ezDesign, ezMixed, link{ezMixedRel}, ezPerm, ezPlot, ezPrecis, ezPredict, ezResample, ezStats, progress_time, progress_timeCI

Examples

Run this code
#Read in the ANT2 data (see ?ANT2).
data(ANT2)
head(ANT2)
ezPrecis(ANT2)

ezDesign(
    data = ANT2
    , x = .(trial)
    , y = .(subnum)
    , row = .(block)
    , col = .(group)
)
#subnum #7 is missing data from the last half of the experiment

ezDesign(
    data = ANT2
    , x = .(flank)
    , y = .(subnum)
    , row = .(cue)
)
#again, subnum#7 has half the data as the rest

#now look at error rates, which affect the number of RTs we can use
ezDesign(
    data = ANT2[ANT2$error==0,]
    , x = .(flank)
    , y = .(subnum)
    , row = .(cue)
)
#again, subnum#7 stands out because they have half the data as the rest
#also, subnum#14 has no data in any incongruent cells, suggesting that 
##they made all errors in this condition
#finally, subnum#12 has virtually no data, suggesting that they mistakenly 
##swapped responses

Run the code above in your browser using DataLab