gen2list: Data formats

Description Usage Arguments Details Value

Description

STACMR accepts two kinds of data structure, list format and general format. gen2list transforms from the general format into the list format.

Usage

1
gen2list(data = NULL, varnames)

Arguments

data

data.frame or matrix in general format (see below).

varnames

optional list of the names of each within-participant condition.

Details

List Format

In this format, the data are contained in a b x n list where b is the number of between-participant conditions (groups) and n is the number of dependent variables. Each component of the list is itself an N x w matrix of observations where N is the number of subjects (which may vary across groups and dependent variables) and w is the number of within-participant conditions (fixed across groups and dependent variables). The dependent variable may be either within-participant or between-participant. This does not matter because the correlation between dependent variables is assumed to be zero (although this might change in future implementations).

General format

This is a fixed column format organised as a matrix in which each row corresponds to an observation and each column is defined as follows:

  1. Participant number (for identification only, not used directly)

  2. Between-participant condition or group (if none, then set this value to 1)

  3. Dependent variable (numbered 1, 2, and so on)

  4. column 4 to end: Values for each within-participant condition

Value

gen2list returns a ngroup x nvar list in which each element is an nsub x ncond matrix of values


monotonicity/stacmr documentation built on Jan. 28, 2020, 3:29 a.m.