Description Usage Arguments Details Value Author(s) Examples
catPbc
calculates discrimination statistics for the categories of categorical variables, i.e. the correlations of each category with the total score on the test. This information can be useful in determining which categories of an item are influencing the overall fit and discrimination in item response scaling applications and/or to find mistakes in recoding.
1 |
datRaw |
A merged unrecoded dataset |
datRec |
The same dataset as in |
idRaw |
Name or column number of the identifier (ID) variable in unrecoded dataset |
idRec |
Name or column number of the identifier (ID) variable in recoded dataset |
context.vars |
Names or column numbers of one or more context variables (e.g., sex, school). |
values |
Data frame with information about values, see |
subunits |
Data frame with information about subunits, see |
file.name |
Optional: Full path of csv file for results. |
verbose |
logical. If |
The column names of datRaw
and datRec
must be consistent with the names provided by the columns subunit
and subunitRecoded
in data.frame subunits
. Otherwise, catPbc
will fail.
A data frame with the discrimination values for each category of categorical variables. The data frame contains the following columns:
item |
Name of unrecoded item |
cat |
Name of category |
n |
Number of responses for this item |
freq |
Absolute frequency of the category |
freq.rel |
Relative frequency of the category |
catPbc |
Discrimination value for the category (correlation with total score) |
recodevalue |
Recode value for the category |
subunitType |
Type of subunit, see |
Nicole Haag
1 2 3 4 5 6 7 8 9 | data(inputDat)
data(inputList)
datRaw <- mergeData(newID = "ID", datList = inputDat, addMbd = TRUE)
datRec <- recodeData(datRaw, values = inputList$values,
subunits=inputList$subunits)
pbcs <- catPbc(datRaw, datRec, idRaw = "ID", idRec = "ID",
context.vars = "hisei", values = inputList$values,
subunits = inputList$subunits)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.