prep2GADS | R Documentation |
GADSdat
object as used in package eatGADS
This function converts a data.frame with data that have been prepared for IRT analyses with eatPrep to an eatGADS object.
prep2GADS(dat, inputList, trafoType = c("scored", "raw"),
misTypes = list(mvi = -95, mnr = -96, mci = -97, mbd = -94, mir = -98, mbi = -99),
verbose = TRUE)
dat |
A data.frame, typically one in the last transformation status after eatPrep-based transformations (after 'scoring'). However, merged, recoded and aggregated, but not scored data can also be handled, as long as this data.frames' colnames correspond to the unit-names |
inputList |
A list following the typical structure of an eatPrep inputList. Only the first three data frames are needed to utilize this function. See ‘Details’. |
trafoType |
Character string. Whether raw data (including original values and subunits) or scored data (usually, 0/1 and mistypes like mbi/mbo et al. and everything aggregated to units) shall be exported. |
misTypes |
A named list with definitions how to recode the different types of missings (mainly used when |
verbose |
logical. If |
This function converts a recoded, aggregated and scored data set to an eatGADS
object using the meta information stored in an inputList
. Only the first three data.frames of a typical inputList
are used (subunits
, values
and units
). However, the order of these three data.frames in the inputList is irrelevant.
Examples of data frames subunits
, values
and units
can be found via data(inputList)
.
A GADSdat
object.
Karoline Sachse
data(inputDat)
data(inputList)
prepDatScored <- automateDataPreparation(inputList = inputList, datList = inputDat,
readSpss = FALSE, checkData=FALSE, mergeData = TRUE, recodeData=TRUE,
aggregateData=TRUE, scoreData=TRUE, writeSpss=FALSE, verbose = TRUE)
GADSobj1 <- prep2GADS(dat = prepDatScored, inputList = inputList[1:3], trafoType = "scored",
verbose=TRUE)
prepDatRaw <- automateDataPreparation(inputList = inputList, datList = inputDat,
readSpss = FALSE, checkData=FALSE, mergeData = TRUE, recodeData=FALSE,
aggregateData=FALSE, scoreData=FALSE, writeSpss=FALSE, verbose = TRUE)
GADSobj2 <- prep2GADS(dat = prepDatRaw, inputList = inputList[1:3], trafoType = "raw",
verbose=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.