insert: Insert DIF-corrected variable into original data frame
Description
Insert the DIF corrected variable into the original data frame, with
missing values for observations for which it was impossible to
calculate DIF correction (due to missingness in either the
self-response or one or more of the vignette responses).
Usage
insert(data, obj, vnames, overwrite, debug)
Arguments
data
Original data frame
obj
anchors.rank class object
vnames
A list of character vectors of length 2,which represent the
variable names (in the output data frame) for the lower and upper
bounds, respectively, of the DIF corrected variables.
By default, this will be derived from column names of B and C in
the anchors.rank object: B=c("Bs", "Be"),C=c("Cs", "Ce").
overwrite
A logical value (defaults to FALSE).
Indicates whether to overwrite variables with names the same as
colnames already exist in data.
debug
Default: 0
Value
data, but with two or four additional variables, corresponding
to the lower and upper bounds of the DIF corrected variable.
References
Jonathan Wand, Gary King and Olivia Lau. (2007) ``Anchors: Software for
Anchoring Vignettes''. Journal of Statistical Software. Forthcoming.
copy at http://wand.stanford.edu/research/anchors-jss.pdf