stim_lists: Generate stimulus presentation lists

Description Usage Arguments Value Examples

Description

Generates counterbalanced presentation lists for factorially designed experiments involving stimulus presentation

Usage

1
stim_lists(design_args, as_one = TRUE)

Arguments

design_args

A list describing the experimental design, which must have an element ivs, giving a named list of independent variables, with each list element a vector giving the levels of that IV, or a single number stating the number of desired levels. If any IVs are administered between-subjects or between-items, these should be named in list elements between_subj and between_item respectively. The argument design_args also can optionally include the following two elements: n_item, the desired number of stimulus items, which if unspecified, will result in lists with the minimum possible number of items; and n_rep, the number of repetitions of each stimulus item for each participant (default 1).

as_one

boolean (default TRUE) specifying whether the presentation lists are to be returned as a single data frame or as elements in a list object

Value

a single data.frame (default) with each list identified by list_id or a list of dataframes, depending on the value of as_one

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
stim_lists(list(ivs = c(A = 2, B = 2))) # 2x2 within-subjects within-item

stim_lists(list(ivs = c(A = 2, B = 2, n_item = 16))) # same but w/more items

stim_lists(list(ivs = c(A = 2, B = 2, n_item = 16, n_rep = 3)))

# mixed by subject, fully within by item
stim_lists(list(ivs = list(group = c("adult", "child"),
                           task = c("easy", "hard")),
                between_subj = "group",
                n_item = 12))

# mixed by subject, mixed by item
stim_lists(list(ivs = c(A = 2, B = 2),
           between_subj = "A",
           between_item = "B"))

dalejbarr/funfact documentation built on May 14, 2019, 3:31 p.m.