View source: R/rater_functions.R
make.pseudo | R Documentation |
Data from large-scale assessments often are rated by multiple raters. This function reduces the number of raters by the use of “pseudo raters”.
make.pseudo(datLong, idCol, varCol, codCol, alwaysPrefer = NULL,
alwaysNeglect = NULL, valueCol, n.pseudo, item.groups = NULL,
randomize.order = TRUE, verbose = FALSE)
datLong |
Data set in the longformat, i.e. one row per examinee-variable-rater combination. |
idCol |
Name or column number of the person identifier (ID) variable. |
varCol |
Name or column number of the variable identifier. |
codCol |
Name or column number of the rater identifier variable. |
alwaysPrefer |
Optional: Single name of the rater that should always be preferred if it is part of a double coding. |
alwaysNeglect |
Optional: Single name of the rater that should always be neglected if it is part of a double coding. This means that coding by this rater is only taken into account if no other rater has rated this response. |
valueCol |
Name or column number of the value variable. |
n.pseudo |
How many pseudo raters should be used? (value must be lower than the number of real raters) |
item.groups |
Optional: List of linked variables that could later be aggregated into items. If two raters make inconsistent judgments, it may be more favorable for aggregation if all variables belonging to an item are coded by the same rater per examinee. However, if a rater has not rated all the variables of the item, the ratings of other raters are used for the variables not rated by this rater. |
randomize.order |
Logical: if TRUE, the selection of raters to pseudo raters is random. |
verbose |
Logical: give information about number of persons, variables, raters? |
A data.frame in the long format.
Sebastian Weirich
data(rater)
oneRater <- make.pseudo (datLong=rater, idCol="id", varCol="variable", codCol="rater",
valueCol="value", n.pseudo=1, verbose=TRUE)
twoRaters<- make.pseudo (datLong=rater, idCol="id", varCol="variable", codCol="rater",
valueCol="value", n.pseudo=2)
# with item groups, allowing that all variables belonging to an item are coded by the
# same rater (per examinee)
itemGroup<- list(first = c("V01", "V03"), second = c("V05", "V06", "V07"))
oneRater2<- make.pseudo (datLong=rater, idCol="id", varCol="variable", codCol="rater",
item.groups = itemGroup, valueCol="value", verbose=TRUE, n.pseudo=1)
attr(oneRater2, "info")
# prefer John
oneRater <- make.pseudo (datLong=rater, idCol="id", varCol="variable", codCol="rater",
alwaysPrefer = "John", valueCol="value", n.pseudo=1, verbose=TRUE)
# neglect Edward
oneRater <- make.pseudo (datLong=rater, idCol="id", varCol="variable", codCol="rater",
alwaysNeglect = "Edward", valueCol="value", n.pseudo=1, verbose=TRUE)
# prefer Dolores and neglect Edward
oneRater <- make.pseudo (datLong=rater, idCol="id", varCol="variable", codCol="rater",
alwaysPrefer = "Dolores", alwaysNeglect = "Edward", valueCol="value",
n.pseudo=1, verbose=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.