checkDesign: Check Datasets for Deviations From Test Design

Description Usage Arguments Author(s) Examples

View source: R/checkDesign.r

Description

This function checks whether a data frame corresponds to a particular rotated block design, i.e. whether all persons have valid codes on all items they were presented with and one consistent missing code for all items they were not presented with.

Usage

1
2
checkDesign(dat, booklets, blocks, rotation, sysMis="NA", id="ID", 
    subunits = NULL, verbose = TRUE)

Arguments

dat

A data frame

booklets

A data frame containing information about the number of blocks in each booklet and the names of these blocks. See ‘Examples’.

blocks

A data frame containing the names of subunits and their order within each block. See ‘Examples’.

rotation

A data frame containing information about which participant worked on which booklet. See ‘Examples’.

sysMis

A character vector of length 1 indicating the missing code for items that were not administered to a participant. Default is "NA".

id

A character vector of length 1 indicating the name of the participant identifier variable in dat. Default is ID.

subunits

Optional: A data frame with subunit information (c.f. inputList). This data frame is used to identify the names of recoded subunits.

verbose

logical. If FALSE, no information is printed.

Author(s)

Karoline Sachse

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
data(inputDat)
data(inputList)

prepDat <- automateDataPreparation (inputList = inputList, datList = inputDat,
    readSpss = FALSE, checkData = FALSE, mergeData = TRUE, recodeData = TRUE, 
    aggregateData = FALSE, scoreData = FALSE, writeSpss = FALSE, verbose = TRUE)
		
checkDesign(dat = prepDat, booklets = inputList$booklets, blocks = inputList$blocks, 
    rotation = inputList$rotation, sysMis = "mbd", id="ID", 
    subunits = inputList$subunits, verbose = TRUE)

prepDat[1:7,"I22R"] <- "1"
prepDat[1,c("I01R","I02R","I03R")] <- "mbd"

checkDesign(dat = prepDat, booklets = inputList$booklets, blocks = inputList$blocks, 
    rotation = inputList$rotation, sysMis = "mbd", id="ID", 
    subunits = inputList$subunits, verbose = TRUE)

eatPrep documentation built on May 2, 2019, 5:20 p.m.

Related to checkDesign in eatPrep...