metaSDTdata {metaSDTreg}R Documentation

Construct metaSDTdata

Description

Constructor function for a metaSDTdata object.

Usage

metaSDTdata(data, type1, type2, signal)

Arguments

data

Data frame to be converted. Data should be in long format with one row corresponding to a single response.

type1

A string naming the variable containing the type 1 response, which should be an ordered factor with two levels where the first level corresponds to 'noise',

type2

A string naming the variable containing the ordinal type 2 response, which should be an ordered factor.

signal

A string naming the variable containing the signal.

Details

If type1 or type 2 is not an ordered factor, the function returns a warning. The function constructs a data frame containing variables named c('type1','type2','A','signal') along with any other variable in 'data' that is not given as an argument to the function. Because of this a warning is issued when the names c('type1','type2','A','signal') are present in 'data'.

Value

A data object of class 'metaSDTdata'. This has attributes 'L', the number of levels in the ordinal type 2 rating, and 'K' which is two times L (the number of levels of the ordinal variable 'A').

Examples

metadata <- metaSDTdata(simMetaData, type1='resp', type2='conf', signal='S')

summary(metadata)
summary.data.frame(metadata)


[Package metaSDTreg version 0.2.2 Index]