Learn R Programming

ssMousetrack (version 1.1.7)

generate_Z: Generate a row-wise stacked boolean partition matrix of JI rows and K columns

Description

Generate a row-wise stacked boolean partition matrix of JI rows and K columns

Usage

generate_Z(I, J, K, type = c("symmetric", "random"))

Value

a (JI x K) boolean matrix

Arguments

I

(integer) number of individuals

J

(integer) number of trials

K

(integer) number of levels for a categorical variables

type

(character) method to generate the matrix: symmetric (default) or random

Details

The function generates a (JI x K) boolean partition matrix for I individuals, J stimuli and K categories. Note that J and K must be chosen so that J This is an internal function, generally not to be called by the user.

Examples

Run this code
Z <- generate_Z(I = 2,J = 12,K = 4,type="symmetric")
print(Z)

Run the code above in your browser using DataLab