generate_design: Generate the design of a mouse-tracking experiment

View source: R/generate_design.R

generate_designR Documentation

Generate the design of a mouse-tracking experiment

Description

Generate the design of a mouse-tracking experiment

Usage

generate_design(I = 10, J = 12, K = c(4), Z.type = c("symmetric"))

Arguments

I

(integer) number of individuals

J

(integer) number of trials

K

(list of integers) list of length Q of the number of levels for each categorical variable

Z.type

(list of characters) list of length Q of the methods (symmetric or random) to generate the matrix (see generate_Z)

Details

The function generates a dataframe containing the experimental design of a mouse-tracking study. The design is of the order (sbj,trial,variable1,...variableQ), where variable1,...,variableQ are Q categorical variables each with K_1,...,K_Q levels. The levels are codified using hundreds. This is an internal function, generally not to be called by the user.

Value

a dataframe of the order (sbj,trial,variable1,...variableQ)

Examples


## Generate a design with Q = 2 categorical variables:
## the first variable has K = 4 levels generated via symmetric method
## the second variable has K = 3 levels generated via random method.
X <- generate_design(I = 10, J = 12, K = c(4,3), Z.type = c("symmetric","random"))
print(X)

ssMousetrack documentation built on April 5, 2023, 5:11 p.m.