A S4 class to represent data for creating a composite
rawdata
A data frame of the data to be used for the composite scores
groups
A character string, the same length as the number of rows of the data indicating to which group each row belong. May be all the same if only one group present in the data.
thresholds
A list with as many elements as there are unique groups in the data, and where each element is a vector the same length as the number of columns in the data frame, indicating the reference thresholds for each variable, by group (all the same if only one group).
higherisbetter
A logical vector the same length as the number of
columns in the data frame, indicating whether higher is better for
each variable (if TRUE
) and otherwise (if FALSE
) that
lower is better, indicating that variable should be reversed.
k
The number of variables as an integer.
rawtrans
A list of functions to transform the raw data (and thresholds).