convertDFtoScoreMatrix: Convert an MRMC data frame to a score matrix

View source: R/utils.R

convertDFtoScoreMatrixR Documentation

Convert an MRMC data frame to a score matrix

Description

Convert an MRMC data frame to a score matrix, dropping readers or cases with no observations

Usage

convertDFtoScoreMatrix(dfMRMC, modality = NULL, dropFlag = TRUE)

Arguments

dfMRMC

An MRMC data frame

modality

The score matrix depends on the modality. If more than one modality exists in the data frame, you must specify which modality to subset.

dropFlag

[logical] The default setting (TRUE) removes readers and cases that have no observations. Dropping them by default will speed up analyses. Leaving the levels (dropFlag = FALSE) is useful if you need the entire score or design matrix when comparing or doing analyses with two modalities.

Value

A matrix [nCases, nReaders] of the scores each reader reported for each case


iMRMC documentation built on May 31, 2023, 8:36 p.m.