Title: | An R Package to Extend 'ACER ConQuest' |
---|---|
Description: | Extends 'ACER ConQuest' through a family of functions designed to improve graphical outputs and help with advanced analysis (e.g., differential item functioning). Allows R users to call 'ACER ConQuest' from within R and read 'ACER ConQuest' System Files (generated by the command `put` <https://conquestmanual.acer.org/s4-00.html#put>). Requires 'ACER ConQuest' version 5.40 or later. A demonstration version can be downloaded from <https://shop.acer.org/acer-conquest-5.html>. |
Authors: | Dan Cloney [aut, cre]
|
Maintainer: | Dan Cloney <[email protected]> |
License: | GPL-3 |
Version: | 1.4.5 |
Built: | 2025-02-19 02:10:05 UTC |
Source: | https://github.com/cran/conquestr |
Check that the item responses in raw data are: (1) valid, (2) each valid response mapped to an item appears at least once, and (3) each valid reponse mapped to an item has sufficently many responses (defaults to a minimum of 10 observations for each response category)
checkItemRespValid(data, caseID, validMap, varLabel, validLabel)
checkItemRespValid(data, caseID, validMap, varLabel, validLabel)
data |
Raw data, a data frame. |
caseID |
A string indicating the name of the case id variable in the data. |
validMap |
A data frame which contains a mapping of valid responses to item lables. This data frame shoudl be in long format, with each valis response * item conbination representing a row. |
varLabel |
A string indicating the name of the variable in validMap that identidies the valis items names/lables. |
validLabel |
A string indicating the name of the variable in validMap that contains the valid codes/responses for each item. This shoudl include missing values (e.g., "99") |
A list of lists: one list per item in validMap$varLabel. Within each list, there can be up to three dfs: (1) the case ids and invalid responses for the item, (2) the valid codes not observed in the data set, and (3) the valid codes observed fewer than 10 times in the data. NOTE: a wanring is thrown if the validMap$varLabel is not found in the data.
Check raw data: are all required variables preseent and ensure there are no extraneous variables.
checkVars(data, varNames, except = NULL)
checkVars(data, varNames, except = NULL)
data |
Raw data, a data frame. |
varNames |
Vector of valid variable names. |
except |
A vector of variable names to be excluded form the check. |
A list.
takes an item in one model's parameterisation and returns it in another parameterisation.
cnvrtItemParam(item, from = "muraki", to = "conquest", D = 1)
cnvrtItemParam(item, from = "muraki", to = "conquest", D = 1)
item |
an item design matrix that is of size response categories (m) by four:
|
from |
a string, either "muraki" or "conquest" (default) (see 10.1177/0146621697211001). Describing the parameterisation of item |
to |
a string, either "muraki" or "conquest" (default) (see 10.1177/0146621697211001). Describing the output parameterisation of the returned item parameter matrix Note that "muraki" assumes the scaling constant D = 1.7 (to give the normal ogive metric) |
D |
a number, giving the scaling constant. Default is 1 (logistic metric). Other common values are D = 1.7 (to give the normal ogive metric) |
an m x 4 matrix of item parameters. The same dimensions as the input, item
myTheta <- 0 myDelta <- 1.5 a <- 1.5 m <- 3 itemParamX <- seq(0, m-1, 1) itemParamD <- rep(myDelta, m) itemParamT <- c(0, -0.5, 0.5) itemParamA <- rep(a, m) itemParam <- cbind(itemParamX, itemParamD, itemParamT, itemParamA) colnames(itemParam)<- c("x", "d", "t", "a") myItem <- cnvrtItemParam(itemParam, from = "conquest", to = "muraki")
myTheta <- 0 myDelta <- 1.5 a <- 1.5 m <- 3 itemParamX <- seq(0, m-1, 1) itemParamD <- rep(myDelta, m) itemParamT <- c(0, -0.5, 0.5) itemParamA <- rep(a, m) itemParam <- cbind(itemParamX, itemParamD, itemParamT, itemParamA) colnames(itemParam)<- c("x", "d", "t", "a") myItem <- cnvrtItemParam(itemParam, from = "conquest", to = "muraki")
Call an instance of 'ACER ConQuest' at the command line and run a control file (syntax).
ConQuestCall(cqc, cqExe, stdout = "")
ConQuestCall(cqc, cqExe, stdout = "")
cqc |
The location of the control file (syntax) to be run. |
cqExe |
The path to the 'ACER ConQuest' executable. Note, if this argument is missing, conquestr will find a local installation of ACER ConQuest by first searching the default installation locations (Program Files on Windows and Applications on Mac) then searching other local directories (Appdata and the HOME path). |
stdout |
On Mac only, can be toggled to NULL (or a connection) to suppress output to R console. |
prints 'ACER ConQuest' output to stdout.
## Not run: ConQuestCall() ## End(Not run)
## Not run: ConQuestCall() ## End(Not run)
Read an 'ACER ConQuest' rout file (a binary file)
created by a plot
command in 'ACER ConQuest'.
ConQuestRout(myRout)
ConQuestRout(myRout)
myRout |
The path to the binary rout file. |
A list containing the data objects to recreate 'ACER ConQuest' plots.
myPlot <- ConQuestRout() ## Not run: # the default example is an ICC plot from Example 1 # <https://conquestmanual.acer.org/s2-00.html#s2-02>. str(myPlot) ## End(Not run)
myPlot <- ConQuestRout() ## Not run: # the default example is an ICC plot from Example 1 # <https://conquestmanual.acer.org/s2-00.html#s2-02>. str(myPlot) ## End(Not run)
Read an ”ACER ConQuest” system file created by a put
command in 'ACER ConQuest'.
The system file must not be compressed. Use the option ‘compressed=no“ in the put command within ’ACER ConQuest'.
ConQuestSys(myCqs, isMini = FALSE)
ConQuestSys(myCqs, isMini = FALSE)
myCqs |
The location of an uncompressed 'ACER ConQuest' system file created by 'ACER ConQuest' > 4.35. |
isMini |
A boolean, set to TRUE if the system file is a mini system file created by 'ACER ConQuest' command put with option "mini = yes". |
A list containing the data objects created by 'ACER ConQuest'.
mySysData <- ConQuestSys() myEx1SysData <- ConQuestSys(myCqs = system.file("extdata", "mysysfile.cqs", package = "conquestr")) ## Not run: # if you run the above example this will return your original 'ACER ConQuest' syntax. cat(unlist(myEx1SysData$gCommandHistory)) ## End(Not run)
mySysData <- ConQuestSys() myEx1SysData <- ConQuestSys(myCqs = system.file("extdata", "mysysfile.cqs", package = "conquestr")) ## Not run: # if you run the above example this will return your original 'ACER ConQuest' syntax. cat(unlist(myEx1SysData$gCommandHistory)) ## End(Not run)
creates a standard folder structure to work with 'ACER ConQuest' Projects.
createConQuestProject(prefix = getwd(), ...)
createConQuestProject(prefix = getwd(), ...)
prefix |
a valid file path where to create project folders. |
... |
optional params, including "setDebug" |
Boolean TRUE.
## Not run: createConQuestProject() ## End(Not run)
## Not run: createConQuestProject() ## End(Not run)
Internal function to decompress an 'ACER ConQuest' system file that has been compressed using zlib.
DecompressSys(myFile)
DecompressSys(myFile)
myFile |
An connection to a compressed 'ACER ConQuest' system file
created by the |
A connection to an uncompressed system file in the users temp dir.
conquestr::ConQuestSys()
Helper function to apply Fisher's transformation to a correlation matrix.
fisherTrnsfrm(myCorMat)
fisherTrnsfrm(myCorMat)
myCorMat |
A correlation matrix. |
A correlation matrix with Fisher's transform applied to values -1 > x > 1.
helper function to produce nicely formatted summary tables from a ConQuest Itanal.
fmtCqItanal( cqItanal, groups = "all", itemNumber = "all", ptBisFlag = 0, textColHighlight = "red", valueDecPlace = 2 )
fmtCqItanal( cqItanal, groups = "all", itemNumber = "all", ptBisFlag = 0, textColHighlight = "red", valueDecPlace = 2 )
cqItanal |
An ACER ConQuest itanal list object returned by function |
groups |
a vector of group levels to include in the format. |
itemNumber |
a vector of generalised item numbers to format. |
ptBisFlag |
Something. |
textColHighlight |
Something. |
valueDecPlace |
Something. |
A list
myEx1Sys <- ConQuestSys() myEx1Sys_itanal <- getCqItanal(myEx1Sys) myItanalSummary <- fmtCqItanal(myEx1Sys_itanal) print(myItanalSummary[[1]])
myEx1Sys <- ConQuestSys() myEx1Sys_itanal <- getCqItanal(myEx1Sys) myItanalSummary <- fmtCqItanal(myEx1Sys_itanal) print(myItanalSummary[[1]])
Generates a list of item parameter matrices for use in
function like conquestr::genResponses
and conquestr::informationWrightMap
genItems(n, scores = NULL, deltadots, taus, discrims = 1, centre = NULL)
genItems(n, scores = NULL, deltadots, taus, discrims = 1, centre = NULL)
n |
How many items? |
scores |
When NULL it is assumed that all items have integer scoring, increasing for each category k, and beginning from 0. Otherwise a list where the elements are, in order:
|
deltadots |
A list that describes the sampling distribution from which item location paramters are drawn. The elements of the list are, in order:
|
taus |
A list that describes the sampling distribution from which taus are drawn. Taus are deviations away from the average item location parameter. The elements of the list are, in order:
|
discrims |
A list that describes the sampling distribution from which discrimination parameters are drawn.
|
centre |
A number indicating the value to centre the generated values in deltadots on. Typically 0 for identification purposes. If NULL then values are left at their generated values (e.g., deviating from the expected mean proportional to sampling error). |
A list of item matrices.
simplef()
, genResponses()
, browseVignettes("conquestr")
myItem <- matrix(c(0, 0, 0, 0, 1, 1, 0, 1), ncol = 4, byrow = TRUE) myItems <- list(myItem, myItem) myItems[[2]][2, 2] <- -1 # make the second item delta equal to -1 myResponses <- genResponses(abilities = rnorm(100), itemParams = myItems)
myItem <- matrix(c(0, 0, 0, 0, 1, 1, 0, 1), ncol = 4, byrow = TRUE) myItems <- list(myItem, myItem) myItems[[2]][2, 2] <- -1 # make the second item delta equal to -1 myResponses <- genResponses(abilities = rnorm(100), itemParams = myItems)
Generates response vectors for n
cases to i
items given
known item parameters, person abilities, and (optionally) other inputs.
genResponses( abilities, groups = NULL, itemParams, BMatrix = 1, mcarP = 0, perturbR = NULL )
genResponses( abilities, groups = NULL, itemParams, BMatrix = 1, mcarP = 0, perturbR = NULL )
abilities |
A person by latent-dimension matrix of abilities. One column per dimension. |
groups |
A vector of factors of the same length as |
itemParams |
A list of item parameters of the structure used in |
BMatrix |
A simplified B-matrix mapping dimensions (columns) to items (rows). Or the integer "1" if items are dichotomous and ability is uni-dimensional. |
mcarP |
A double indicating the proportion of missing data under the MCAR assumption. |
perturbR |
A list of lists, where each element of the list refers to one item and contains a list of elements describing how responses to that item should be perturbed to model misfit. Each element of the list should contain, in order:
|
A matrix, n
cases by i
items, of scored item responses.
simplef()
, browseVignettes("conquestr")
myItem <- matrix(c(0, 0, 0, 0, 1, 1, 0, 1), ncol = 4, byrow = TRUE) myItems <- list(myItem, myItem) myItems[[2]][2, 2] <- -1 # make the second item delta equal to -1 myResponses <- genResponses(abilities = rnorm(100), itemParams = myItems)
myItem <- matrix(c(0, 0, 0, 0, 1, 1, 0, 1), ncol = 4, byrow = TRUE) myItems <- list(myItem, myItem) myItems[[2]][2, 2] <- -1 # make the second item delta equal to -1 myResponses <- genResponses(abilities = rnorm(100), itemParams = myItems)
creates a data frame representation of the estimation chain from an MCMC model. The burn is discarded and only the unskipped itterations in MCMC chain are retained.
getCqChain(myCqs)
getCqChain(myCqs)
myCqs |
A system file. |
A data frame.
## Not run: getCqChain(ConQuestSys()) ## End(Not run)
## Not run: getCqChain(ConQuestSys()) ## End(Not run)
Get data objects from an R object of class ConQuestSys. This function returns person IDs, response data, case estimates, regression and weight data. Each data type is stored as a data frame, and each data frame is a named element of a list.
PID,
Responses,
Estimates,
Regression.
getCqData(mySys)
getCqData(mySys)
mySys |
An R object of class ConQuestSys, returned by the function conquestr::ConQuestSys |
A List of data frames.
conquestr::ConQuestSys()
mySys <- ConQuestSys() myData <- getCqData(mySys)
mySys <- ConQuestSys() myData <- getCqData(mySys)
Takes a list object returned by conquestr::getCqData
and coerces it to a wide data frame.
This can sometimes cause issues in complex data, for example where there are multiple response
vectors for each case (for example a many-facets model). This is because it is assumed that the data
can be reduced to a matrix of gNCases x m variables (where m is the number of id, item, estimate and
regression variables in the analysis). For more complex data, the user should use the outputs of
conquestr::getCqData
to manually merge together a data frame.
getCqDataDf(cqData)
getCqDataDf(cqData)
cqData |
An R object of class list, returned by the function conquestr::getCqData |
A data frame containing R data frames based on the list objects in the ConQuest system file that has been read in.
conquestr::ConQuestSys()
conquestr::getCqData
mySys <- ConQuestSys() myData <- getCqData(mySys) myDataDf <- getCqDataDf(myData)
mySys <- ConQuestSys() myData <- getCqData(mySys) myDataDf <- getCqDataDf(myData)
creates a data frame representation of the fit of parameters in the item reponse model
getCqFit(myCqs)
getCqFit(myCqs)
myCqs |
A system file. |
A data frame.
## Not run: getCqFit(ConQuestSys()) ## End(Not run)
## Not run: getCqFit(ConQuestSys()) ## End(Not run)
creates a data frame representation of the iteration history for all parameters.
getCqHist(myCqs, labelParams = FALSE)
getCqHist(myCqs, labelParams = FALSE)
myCqs |
An ACER ConQuest system file created using the conquest command, put. |
labelParams |
A boolean. When true, and if long (user) parameter labels are available, replace default history column names (e.g., "Xsi1") with user labels (e.g., "Item one"). Currently only available for Xsi and Tau. |
A data frame.
getCqChain()
which is a wrapper for this function
to use with models estimated by Markov chain Monte Carlo (MCMC) methods.
myHist <- getCqHist(ConQuestSys(), labelParams = TRUE) str(myHist)
myHist <- getCqHist(ConQuestSys(), labelParams = TRUE) str(myHist)
helper function to return list of lists, each list relates to one
generalised item from an ACER ConQuest itanal
output.
Each list contains: (1) item-total and item-rest correlations ....
getCqItanal(sysFile, matrixPrefix = NULL, isDebug = FALSE)
getCqItanal(sysFile, matrixPrefix = NULL, isDebug = FALSE)
sysFile |
An ACER ConQuest system file. |
matrixPrefix |
The name of the itanal analysis defined in ACER ConQuest.
For example, in ACER ConQuest syntax |
isDebug |
A boolean to toggle on or off debug output |
A list.
myItanal <- getCqItanal() print(myItanal[[1]])
myItanal <- getCqItanal() print(myItanal[[1]])
returns an item facility for each item in itanal object created by ACER ConQuest. For a dichotomously scored Rasch-like item, facility is the percent correct. For a polytomously scored item, or with estimated scores, facility is given by: the sum of the number of cases in each response category, multiplied by the score for that category divided by the sum of all cases responding to the items times the maximum score for the item.
getCqItanalFacility(itan)
getCqItanalFacility(itan)
itan |
A list of class "cqItanal" created by |
A list.
mySys <- ConQuestSys() myItan <- getCqItanal(mySys) getCqItanalFacility(myItan)
mySys <- ConQuestSys() myItan <- getCqItanal(mySys) getCqItanalFacility(myItan)
returns an itanal as a data frame in summary format: one row per generalised item with:
item label
valid N
facility (see conquestr::getCqItanalFacility
)
item-rest correlation
item-total correlation
fit (infit/weighted MNSQ) if available
item locations (deltas)
getCqItanalSummary(itan)
getCqItanalSummary(itan)
itan |
A list of class "cqItanal" created by |
A data frame.
mySys <- ConQuestSys() myItan <- getCqItanal(mySys) getCqItanalSummary(myItan)
mySys <- ConQuestSys() myItan <- getCqItanal(mySys) getCqItanalSummary(myItan)
produces a table of model parameter estimates, errors, fits, and scaled 2PL estimates if available.
getCqRespModel(sysFile)
getCqRespModel(sysFile)
sysFile |
An ACER ConQuest system file read into R using conquestr::ConQuestSys |
A List of data frames. Each data frame is a term in the response model
## Not run: myShowRespMod <- getCqRespModel(conquestr::ConQuestSys()) ## End(Not run)
## Not run: myShowRespMod <- getCqRespModel(conquestr::ConQuestSys()) ## End(Not run)
creates a data frame representation of the terms of the model statement, including interactions.
getCqTerms(myCqs)
getCqTerms(myCqs)
myCqs |
A system file. |
A data frame.
## Not run: getCqTerms(ConQuestSys()) ## End(Not run)
## Not run: getCqTerms(ConQuestSys()) ## End(Not run)
creates a data frame representation of the variables in the model statement. Note that steps are not variables.
getCqVars(myCqs)
getCqVars(myCqs)
myCqs |
A system file. |
A data frame.
## Not run: getCqVars(ConQuestSys()) ## End(Not run)
## Not run: getCqVars(ConQuestSys()) ## End(Not run)
returns a list of length gNDims. Each element of the list contains a vector of the gins on this dim.
ginsOnDims(sysFile)
ginsOnDims(sysFile)
sysFile |
An ACER ConQuest system file read into R using conquestr::ConQuestSys |
a list
## Not run: myResult <- ginsOnDims(conquestr::ConQuestSys()) ## End(Not run)
## Not run: myResult <- ginsOnDims(conquestr::ConQuestSys()) ## End(Not run)
Plots test information function, relative to ability density, and item locations.
informationWrightMap( myItems, myAbilities, type = "empirical", minTheta = NA, maxTheta = NA, stepTheta = NA, scaleInfo = 1, plotItemPoints = "deltadots" )
informationWrightMap( myItems, myAbilities, type = "empirical", minTheta = NA, maxTheta = NA, stepTheta = NA, scaleInfo = 1, plotItemPoints = "deltadots" )
myItems |
A list of matricies describing item parameters. |
myAbilities |
A vector of person abilities on one dimension. |
type |
A character String. Should the test information be calculated empirically ("empirical" - default) or analytically using moments of distribution ("approx"). |
minTheta |
The smallest value of ability PDF to plot. |
maxTheta |
The largest value of ability PDF to plot. |
stepTheta |
The increment to iterate over the ability PDF. Defaults to 0.01. |
scaleInfo |
A scaling factor to apply to the plot of tesr information. Because ability distribution is a PDF with area one, and a test information function has area L, this can make the plot more interpretable. Defaults to 1. |
plotItemPoints |
A character string indicating what item points should be plotted along the x-axis. similar to the histogram of item locations plotted on a Wrightmap. Can be "none", "deltadots", "thresholds". |
A ggplot2 object.
myDeltaDots <- data.frame( id = c(1:10), itemid = paste0("item", 1:10), delta = rnorm(10) ) MyTaus <- data.frame( id = c(2L, 10L), itemId = NA, step = c(1L, 1L), tau = rnorm(2) ) myItemList <- makeItemList(deltaDot = myDeltaDots, tau = MyTaus) myInfoPlot <- informationWrightMap(myItemList, rnorm(1000, 0, 1), minTheta=-5, maxTheta=5)
myDeltaDots <- data.frame( id = c(1:10), itemid = paste0("item", 1:10), delta = rnorm(10) ) MyTaus <- data.frame( id = c(2L, 10L), itemId = NA, step = c(1L, 1L), tau = rnorm(2) ) myItemList <- makeItemList(deltaDot = myDeltaDots, tau = MyTaus) myInfoPlot <- informationWrightMap(myItemList, rnorm(1000, 0, 1), minTheta=-5, maxTheta=5)
Calculates an index representing the product of a test information function and an ability distribution.
infoWI(myItems, myAbilities, type = "empirical")
infoWI(myItems, myAbilities, type = "empirical")
myItems |
A vector of item deltas. |
myAbilities |
A vector of person abilities. |
type |
A character String. Should the test information be calculated empirically ("empirical" - default) or analytically using moments of distribution ("approx"). |
A double.
infoWIOut <- infoWI(runif (10, -2, 3), rnorm(1000, 0, 1))
infoWIOut <- infoWI(runif (10, -2, 3), rnorm(1000, 0, 1))
Calculates item information at a value of theta given a set of item parameters for one item.
itemInfoAtTheta(myItem, theta)
itemInfoAtTheta(myItem, theta)
myItem |
A matrix of item parameters of the structure used in |
theta |
A number. |
anItem <- matrix(c(0,0,0,1,1,1,0,1), nrow = 2, byrow = TRUE) itemInfoAtTheta(anItem, 0)
anItem <- matrix(c(0,0,0,1,1,1,0,1), nrow = 2, byrow = TRUE) itemInfoAtTheta(anItem, 0)
Calculates item information over a rage of theta given a set of item parameters. Returns a data frame with item information at a discrete set of values of theta. This is useful for plotting item information functions.
Note this function is redundant - use testInfoOverTheta and pass a single item as a list.
itemInfoOverTheta(myItem, minTheta = -6, maxTheta = 6, stepTheta = 0.1)
itemInfoOverTheta(myItem, minTheta = -6, maxTheta = 6, stepTheta = 0.1)
myItem |
A matrix of item parameters of the structure used in |
minTheta |
The smallest value of ability PDF to calculate info and to plot. Defaults to -6. |
maxTheta |
The largest value of ability PDF to calculate info and to plot. Defaults to 6. |
stepTheta |
The increment to iterate over the ability PDF. Defaults to 0.01. |
anItem <- matrix(c(0,0,0,1,1,1,0,1), nrow = 2, byrow = TRUE) itemInfoOverTheta(anItem)
anItem <- matrix(c(0,0,0,1,1,1,0,1), nrow = 2, byrow = TRUE) itemInfoOverTheta(anItem)
Taskes a list of item parameter matricies and returns a data frame containing Thurstonian Thresholds (gammas) for all items. Thurstonian thresholds are the location on the trait/scale at which the cumulative probability of being in category k, or any higher category equals some probability (usually 0.5, the default). Thurstonian thresholds are considered a way of describing the difficulty of polytomously scored items and are usually the value used in visualisations like Wright maps. Thurstonian thresholds can only be calculated for items where response categories are scored such that each category can be placed in an order increasing scores (e.g., no ties as per the Ordered Partition model)
itemListToThresholds( myItems, threshP = 0.5, minTheta = -20, maxTheta = 20, convC = 1e-05 )
itemListToThresholds( myItems, threshP = 0.5, minTheta = -20, maxTheta = 20, convC = 1e-05 )
myItems |
A list of item parameter matricies of the structure used in |
threshP |
The probability at which the thresholds are calculated (defaults to the usual value of 0.5) |
minTheta |
The lower-bound starting value of the split-half search used to find the threshold for the category. |
maxTheta |
The upper-bound starting value of the split-half search used to find the threshold for the category. |
convC |
The convergence criteria used to determine when the threshold has been found. The difference between
|
A data frame including 4 columns:
id, an integer index reflecting which item this is, in the same order as myItems
itemid, a string with the names from the items in myItems (NA if item list is not named)
step, which step does this threshold belong?
location, the value of the threshold
myItem <- matrix( c( 0, -0.58 , 0 , 1, # delta+tau thurst thresh (gamma) 1, -0.58 , 0.776 , 1, # 0.196 -1.14 2, -0.58 , -0.697 , 1, # -1.277 -0.93 3, -0.58 , -0.629 , 1, # -1.209 -0.64 4, -0.58 , 0.55 , 1 # -0.03 0.25 ), ncol =4, byrow=TRUE ) itemListToThresholds(list(myItem))
myItem <- matrix( c( 0, -0.58 , 0 , 1, # delta+tau thurst thresh (gamma) 1, -0.58 , 0.776 , 1, # 0.196 -1.14 2, -0.58 , -0.697 , 1, # -1.277 -0.93 3, -0.58 , -0.629 , 1, # -1.209 -0.64 4, -0.58 , 0.55 , 1 # -0.03 0.25 ), ncol =4, byrow=TRUE ) itemListToThresholds(list(myItem))
takes in a list of item matrices and returns a list of data frames
each representing the parameters given in the matrices. The return object is
suitable to pass into conquestr::makeItemList
to construct a lit of matrices
where each matrix represent one item's set of item parameters. The structure of the
matrix is the same as used in conquestr::simplef
(a matrix of k categories by four (category score, delta dot, tau, discrimination)).
A common use for this function is turn a list of item matrices into a flat data
structure.
makeItemDfs(itemList)
makeItemDfs(itemList)
itemList |
a list of item matrices. The structure of each
matrix is the same as used in |
a list.
nItems <- 10 myItemsDeltaDot <- data.frame( id= seq(nItems), itemid= NA, delta = runif (nItems, -4, 1) # nItems items in range -4,1 ) myItemsList <- conquestr::makeItemList(deltaDot = myItemsDeltaDot)
nItems <- 10 myItemsDeltaDot <- data.frame( id= seq(nItems), itemid= NA, delta = runif (nItems, -4, 1) # nItems items in range -4,1 ) myItemsList <- conquestr::makeItemList(deltaDot = myItemsDeltaDot)
creates a list of item matrices.
Each matrix represent one item's set of item parameters. The structure of the
matrix is the same as used in conquestr::simplef
(a matrix of k categories by four (category score, delta dot, tau, discrimination)).
makeItemList(scores = NULL, deltaDot, tau = NULL, discrim = 1)
makeItemList(scores = NULL, deltaDot, tau = NULL, discrim = 1)
scores |
a data frame or matrix containing category scores for each item.
If NULL, it is assumed increasing integer scoring starting at 0 is used for all items (that is, the
first category is scored 0, the second category is scored 1, the If a data frame, column labels should be "id", "itemid", "step", "score".
If a matrix, the column order should be: "id", a unique item ID for each item matched with values in If a data frame, or a matrix:
|
deltaDot |
a data frame or matrix of delta dots (average item location/difficulty for each item). If a data frame, column labels should be: "id", "itemid", "delta". "itemid" should be populated with an item label or be missing for all values. If a matrix, column order should be: "id", a unique item ID for each row; "itemid", item labels for each item (or NA); "delta", a delta dot. If a data frame, or a matrix:
|
tau |
NULL if all items are dichotomies.
A data frame or matrix of taus for polytomous items. Only polytomous items should be in this file.
If an item ID in Where a polytomous item has k categories, there should be k-2 rows for that item in If a data frame, column labels should be "id", "itemid", "step", "tau".
If a matrix, the column order should be: "id", a unique item ID for each item matched with values in If a data frame, or a matrix:
|
discrim |
a double, a data frame, or a matrix of item (or category) discrimination parameters. When a double is provided, the value is applied to all discrimination parameters. The default is 1. Setting the value to 1.7 is one approach to re-scale to the normal ogive metric. Otherwise a data.frame or matrix defining the discrimination parameter for each response category. If a data frame, column labels should be "id", "itemid", "step", "discrim". If step is NA and there is only one entry for an item "itemid", the discrimination is assumed to be constant for all response categories with the item. This is the case for named models like the GPCM and 2PL models, and can be a short hand way of defining the discrimination without specifying all categories. When discrimination varies across scoring categories, the Bock-nominal model is implied. In the case of discrimination varying across scoring categories, all categories must be defined. If a data frame, or a matrix:
|
a list.
nItems <- 10 myItemsDeltaDot <- data.frame( id= seq(nItems), itemid= NA, delta = runif (nItems, -4, 1) # nItems items in range -4,1 ) myItemsList <- conquestr::makeItemList(deltaDot = myItemsDeltaDot)
nItems <- 10 myItemsDeltaDot <- data.frame( id= seq(nItems), itemid= NA, delta = runif (nItems, -4, 1) # nItems items in range -4,1 ) myItemsList <- conquestr::makeItemList(deltaDot = myItemsDeltaDot)
Creates a plot of an item characteristic curve (by response category).
For a dichotomous item, this will yield a single curve, for polytomous items this
will produce a curve for each response category.
Note this is not for use with rout
files. See the generic function plotRout
for plotting rout files.
plotCCC( item, abilities, responses, weights = NULL, groups = NULL, range = c(-6, 6), by = 0.1, linetype = "bins", bins = 10, plotZero )
plotCCC( item, abilities, responses, weights = NULL, groups = NULL, range = c(-6, 6), by = 0.1, linetype = "bins", bins = 10, plotZero )
item |
A matrix of item parameters for a single item. Matrix should be of
the form used in |
abilities |
A vector of doubles estimated person abilities. |
responses |
A vector of integers giving the observed person responses to this item. |
weights |
A vector of doubles of sampling weights. |
groups |
A factor vector indicating groups. |
range |
Lower and upper bounds to plot over (defaults to |
by |
A double. The increment to the sequence along |
linetype |
A string. Should the empirical lines be based on "bins", or "regression". Defaults to "bins" |
bins |
If linetype is "bins", how many bins should be used to chunk the empirical lines? defaults to 10. Ignored otherwise. |
plotZero |
Should the zero category be plotted?
Defaults to |
A ggplot2 object.
myRout <- ConQuestRout() myPlot <- plotRout(myRout) ## Not run: # if you run the above example you will have an ICC plot in the object `myPlot`. plot(myPlot) ## End(Not run)
myRout <- ConQuestRout() myPlot <- plotRout(myRout) ## Not run: # if you run the above example you will have an ICC plot in the object `myPlot`. plot(myPlot) ## End(Not run)
generates a plot from a history object.
Use getCqHist
to create a history object from an 'ACER ConQuest' system file.
plotCqHist( myHist, centre = TRUE, params = c("all"), legend = FALSE, plotProblems = NULL )
plotCqHist( myHist, centre = TRUE, params = c("all"), legend = FALSE, plotProblems = NULL )
myHist |
an R object created by the |
centre |
a Boolean representing whether the iteration history should be mean centred (within parameter). This is helpful for plots that include all parameters to ensure the Y axis is sensible. Consider, for example, the readability of a plot with raw values of the Likelihood and item parameters on it. |
params |
A string of which params to plot. Must be one or more of "all", "Likelihood", "Beta", Variance", "Xsi", "Tau". Note the match when using "Beta", Variance", "Xsi", "Tau" is by regular expression, so "Xsi1" will plot item location parameter 1, 10-19, 100-199 and so on. |
legend |
Should a legend be plotted? |
plotProblems |
an optional list defining which potential problem parameters to plot.
|
A ggplot2 object.
## Not run: myHistPlot <- plotCqHist(getCqHist(ConQuestSys())) ## End(Not run)
## Not run: myHistPlot <- plotCqHist(getCqHist(ConQuestSys())) ## End(Not run)
Creates a plot (ggplot2 object) of item parameter estimates common to two system files (e.g., a DIF analysis).
plotDif(mySysToItemDifDf, myScale = "centred", mySuffixes)
plotDif(mySysToItemDifDf, myScale = "centred", mySuffixes)
mySysToItemDifDf |
An R object of class data frame returned from conquestr::sysToItemDifDf |
myScale |
A string specifying if the item parameter estimates displayed should be "centred" (default), "scaled" (z scores), or "none" (raw). |
mySuffixes |
a vector of strings specifying the names for the two groups being analysed,
e.g., if the two system files are an analysis of boys and girls, the vector may be |
A ggplot2 object.
conquestr::sysToItemDifDf()
mySys1 <- ConQuestSys() mySys2 <- ConQuestSys() mySysList <- list(mySys1, mySys2) myDifDf <- sysToItemDifDf(mySysList, mySuffixes = c("_male", "_female"), myDims = "all") myDifPlot <- plotDif (myDifDf,myScale = "centred", mySuffixes = c("_male", "_female")) ## Not run: # if you run the above example you will have the plot in the object `myDifPlot`. plot(myDifPlot) ## End(Not run)
mySys1 <- ConQuestSys() mySys2 <- ConQuestSys() mySysList <- list(mySys1, mySys2) myDifDf <- sysToItemDifDf(mySysList, mySuffixes = c("_male", "_female"), myDims = "all") myDifPlot <- plotDif (myDifDf,myScale = "centred", mySuffixes = c("_male", "_female")) ## Not run: # if you run the above example you will have the plot in the object `myDifPlot`. plot(myDifPlot) ## End(Not run)
Creates a plot (ggplot2 object) of item parameter
estimates and abilities on latent trait. Note this is not for
use with rout
files. See the method method plotRout.itemMap
to the generic function plotRout
plotItemMap(mySys, myDims = "D1", ginLabs = "short", abilityType = "PV", ...)
plotItemMap(mySys, myDims = "D1", ginLabs = "short", abilityType = "PV", ...)
mySys |
An 'ACER ConQuest' system file object created using the conquestr::ConQuestSys function. |
myDims |
A string specifying which specific dimensions should be included. The default is "D1", Specific dimensions are specified by the label "D1" for dimensions 1 etc. |
ginLabs |
A string specifying whether short or long gin labels should be used. Default to "short". |
abilityType |
What kind of person ability estimate should be used? Defaults to plausible values. Alternatively WLE, MLE, EAP. |
... |
Optional arguments, mostly for debugging, e.g., |
A ggplot2 object.
mySys1 <- ConQuestSys() myItemMap <- plotItemMap(mySys1) ## Not run: # if you run the above example you will have the plot in the object `myItemMap`. plot(myItemMap) ## End(Not run)
mySys1 <- ConQuestSys() myItemMap <- plotItemMap(mySys1) ## Not run: # if you run the above example you will have the plot in the object `myItemMap`. plot(myItemMap) ## End(Not run)
Creates a plot of a model implied category characteristic curve.
Note this is not for use with rout
files. See the generic function plotRout
for plotting rout files.
plotModelCCC(item, range = c(-6, 6), by = 0.1, plotZero)
plotModelCCC(item, range = c(-6, 6), by = 0.1, plotZero)
item |
Item parameters for a single item. |
range |
Lower and upper bounds to plot over (defaults to c(-6, 6). |
by |
Increment to the sequence along 'range“. |
plotZero |
Should the zero category be plotted?
Defaults to |
A ggplot2 object.
myItem <- matrix( c( 0, 0, 0, 1, 1, 1, 0, 1 ), ncol = 4, byrow=TRUE ) myPlot <- plotModelCCC(myItem)
myItem <- matrix( c( 0, 0, 0, 1, 1, 1, 0, 1 ), ncol = 4, byrow=TRUE ) myPlot <- plotModelCCC(myItem)
Creates a plot of an item- or test- expected score curve.
If ability estimates are provided, both empirical and model curves are produced.
Can optionally handle weights and groups as required.
Note this is not for use with rout
files. See the generic function plotRout
for plotting rout files.
plotModelExp( items, range = c(-6, 6), by = 0.1, bins = NULL, abilities = NULL, weights = NULL, group = NULL, scale = FALSE )
plotModelExp( items, range = c(-6, 6), by = 0.1, bins = NULL, abilities = NULL, weights = NULL, group = NULL, scale = FALSE )
items |
a list of one or more matrices of item parameters. Used in producing model-implied curves. |
range |
Lower and upper bounds to plot over (defaults to c(-6, 6). Used in producing model-implied curves. For empirical curves a range is chosen given the min and max values in abilities. |
by |
Increment to calculate expectation along |
bins |
A double. Optional. How many equally sized bins should abilities be broken up into? Used in producing empirical curves. If not provided and abilities are provided, a suitable value is chosen given the length of abilities. |
abilities |
A vector of doubles. Optional. |
weights |
A vector of doubles. Optional. |
group |
A vector of type factor. Optional. |
scale |
A Boolean. Whether plot should be scaled such that the Y-axis ranges from 0 to 1. |
A ggplot2 object.
myItem <- matrix( c( 0, 0, 0, 1, 1, 1, 0, 1 ), ncol = 4, byrow=TRUE ) myPlot <- plotModelExp(list(myItem))
myItem <- matrix( c( 0, 0, 0, 1, 1, 1, 0, 1 ), ncol = 4, byrow=TRUE ) myPlot <- plotModelExp(list(myItem))
generates a plot from an 'ACER ConQuest' Rout file. use ConQuestRout
to read in an Rout
file created by a plot
command in 'ACER ConQuest'.
plotRout(myRout, ...) ## S3 method for class 'TestInfo' plotRout(myRout, ...) ## S3 method for class 'InformationWithLatentDist' plotRout(myRout, ...) ## S3 method for class 'ICC' plotRout(myRout, ...) ## S3 method for class 'MCC' plotRout(myRout, ...) ## S3 method for class 'TCC' plotRout(myRout, ...) ## Default S3 method: plotRout(myRout, ...)
plotRout(myRout, ...) ## S3 method for class 'TestInfo' plotRout(myRout, ...) ## S3 method for class 'InformationWithLatentDist' plotRout(myRout, ...) ## S3 method for class 'ICC' plotRout(myRout, ...) ## S3 method for class 'MCC' plotRout(myRout, ...) ## S3 method for class 'TCC' plotRout(myRout, ...) ## Default S3 method: plotRout(myRout, ...)
myRout |
an R object created by the |
... |
additional arguments passed into plotting functions |
A ggplot2 object.
myRout <- ConQuestRout() myPlot <- plotRout(myRout) ## to see why we import this, see https://ggplot2.tidyverse.org/articles/ggplot2-in-packages.html
myRout <- ConQuestRout() myPlot <- plotRout(myRout) ## to see why we import this, see https://ggplot2.tidyverse.org/articles/ggplot2-in-packages.html
Applies the law of total variance (EVEs law) to calculate the mean and variance of a set of PVs for one dimension.
pvMeanVar(myData)
pvMeanVar(myData)
myData |
A matrix of PVs for one dimension: m PVs by n cases. |
A list containing the mean and variance of the PVs.
Helper function to apply correction to correlation matrix. When working with standardised residuals, the expectation of the correlations is -1/(L-1) rather than 0 See DOI: 10.1177/0013164410379322
q3ExpCorrect(myCorMat)
q3ExpCorrect(myCorMat)
myCorMat |
A correlation matrix. |
A correlation matrix with the Q3 statistic correction applied.
Internal function to read an 'ACER ConQuest' system file. Called by conquestr::ConQuestSys.
ReadSys(myFile, isMini)
ReadSys(myFile, isMini)
myFile |
An connection to an 'ACER ConQuest' system file created by the
|
isMini |
A boolean, set to TRUE if the system file is a mini system file created by 'ACER ConQuest' command put with option "mini = yes". |
A list containing the data objects created by 'ACER ConQuest'.
conquestr::ConQuestSys()
Internal function to read an 'ACER ConQuest' system file. Called by conquestr::ConQuestSys.
ReadSysMini(myFile, Dimensions, N, NPlausibles, isDebug)
ReadSysMini(myFile, Dimensions, N, NPlausibles, isDebug)
myFile |
An 'ACER ConQuest' mini system file created by the |
Dimensions |
. |
N |
. |
NPlausibles |
. |
isDebug |
. |
A list containing the data objects created by 'ACER ConQuest'.
conquestr::ConQuestSys()
Recode raw item responses for analyses.
recodeResps(data, recodeMap, varLabel, rawLabel, recodeLabel)
recodeResps(data, recodeMap, varLabel, rawLabel, recodeLabel)
data |
Raw data, a data frame. |
recodeMap |
A data frame which contains the raw responses and corresponding recoded responses for each of the items in long form. |
varLabel |
A variable name in recodeMap that identifes the item label. |
rawLabel |
A variable name in recodeMap that identifies the raw item responses to be recoded. |
recodeLabel |
A variable name in recodeMap that idenitfies the new values to recode to. |
a data frame with raw data recoded according to recodeMap.
iterate through a data frame and use replaceInVector
replaceInDataFrame(d, r, x)
replaceInDataFrame(d, r, x)
d |
A DataFrame. |
r |
A double - the value to be replaced if it is < -1e300. |
x |
A double - the value to replace r with. |
replace a very large neagtive number with something - usually NA_REAL
replaceInVector(v, r, x)
replaceInVector(v, r, x)
v |
A NumericVector. |
r |
A double - the value to be replaced if it is < -1e300. |
x |
A double - the value to repalce r with. |
Search for object names within a ConQuest System file object.
searchConQuestSys(searchString, mySys, value = TRUE, ignore.case = TRUE)
searchConQuestSys(searchString, mySys, value = TRUE, ignore.case = TRUE)
searchString |
A string to search within the names of mySys. |
mySys |
An 'ACER ConQuest' system file object created using the conquestr::ConQuestSys function. |
value |
Should searchConQuestSys return the name of the object or its index. |
ignore.case |
Should searchConQuestSys ignore the case of the search term. |
a string including object names mathching the search term
Function to cacluate the Steiger statistic. The Steiger statistic is a test of independance of the standardised residuals ((O-E)/sqrt(Var(E))), where Var(E) = p(x)/(1-p(x)).
steigerStat(myDat, q3Adj = TRUE, fisher = TRUE, dfAdj = FALSE, tpm)
steigerStat(myDat, q3Adj = TRUE, fisher = TRUE, dfAdj = FALSE, tpm)
myDat |
A data frame or matrix containing standardised residuals. |
q3Adj |
A bool indicating whether the Q3 correction should be applied. |
fisher |
A bool indicating whether the Fisher Transform should be applied. |
dfAdj |
A bool indicating whether the df should be adjusted for sample size, L, and targeting.
If dfAdj is TRUE, then you must pass in the optional argument |
tpm |
A number indicating the test-person match, where 0 indicates that mean item difficulty is equal to mean person ability, and -1 indcates that mean item difficulty is 1 logit below mean person ability. |
A list of class "steigerStat" with the Steiger Statistic, correlation matrix, and chi square test.
takes a data frame created by getCqChain and returns a list reporting the mean and variaince for each parameter
summariseCqChain(myChain)
summariseCqChain(myChain)
myChain |
A data frame returned from getCqChain. |
A list.
## Not run: summariseCqChain(getCqChain(ConQuestSys())) ## End(Not run)
## Not run: summariseCqChain(getCqChain(ConQuestSys())) ## End(Not run)
checks
sysFileOk(sysFile, defaultSys)
sysFileOk(sysFile, defaultSys)
sysFile |
An ACER ConQuest system file read into R using conquestr::ConQuestSys |
defaultSys |
A Boolean indicating if sysFile is the defualt system file created by an empty call to conquestr::ConQuestSys |
## Not run: sysFileOkResult <- sysFileOk(conquestr::ConQuestSys()) ## End(Not run)
## Not run: sysFileOkResult <- sysFileOk(conquestr::ConQuestSys()) ## End(Not run)
Read an R object of class ConQuestSys and create a labelled representation of the B matrix (scoring matrix). This maps item response categories to items and dimensions. Returns long data frame, where items are duplicated if they are in many dimensions.
sysToBMatrixDf(mySys, applyLabels = TRUE)
sysToBMatrixDf(mySys, applyLabels = TRUE)
mySys |
An R object of class ConQuestSys, returned by the function conquestr::ConQuestSys |
applyLabels |
A bool indicating whether labels (e.g., dimension labels) should be appended. |
A data frame containing R the labelled B matrix.
myBMatrix <- sysToBMatrixDf(ConQuestSys()) ## Not run: # if you run the above example you will have the B Matrix from the example system file. str(myBMatrix) ## End(Not run)
myBMatrix <- sysToBMatrixDf(ConQuestSys()) ## Not run: # if you run the above example you will have the B Matrix from the example system file. str(myBMatrix) ## End(Not run)
Creates a data frame that includes the common item parameter estimates from two (or more) system files (e.g., a DIF analysis).
sysToItemDifDf(listOfSysFiles, mySuffixes, myDims = "all")
sysToItemDifDf(listOfSysFiles, mySuffixes, myDims = "all")
listOfSysFiles |
A list of system files returned from conquestr::ConQuestSys |
mySuffixes |
a vector of strings specifying the names for the two groups being analysed,
e.g., if the two system files are an analysis of boys and girls, the vector may be |
myDims |
A string specifying if all or specific dimensions should be included. The default is "all", Specific dimensions are specified by the label "D1" for dimensions 1 etc. |
A data frame object.
conquestr::plotDif ()
Calculates test information at a value of theta given a list of matricies of item parameters for one or more items.
testInfoAtTheta(myItems, theta)
testInfoAtTheta(myItems, theta)
myItems |
A list of matrices of item parameters of the structure used in |
theta |
a number. |
anItem <- matrix(c(0,0,0,1,1,1,0,1), nrow = 2, byrow = TRUE) testInfoAtTheta(list(anItem), 0)
anItem <- matrix(c(0,0,0,1,1,1,0,1), nrow = 2, byrow = TRUE) testInfoAtTheta(list(anItem), 0)
Calculates test information over a range of theta given a list of matricies of item parameters for one or more items. Returns a data frame with item information at a discrete set of values of theta. This is useful for plotting test information functions.
testInfoOverTheta(myItems, minTheta = -6, maxTheta = 6, stepTheta = 0.1)
testInfoOverTheta(myItems, minTheta = -6, maxTheta = 6, stepTheta = 0.1)
myItems |
a list of item parameters of the structure used in |
minTheta |
The smallest value of ability PDF to calculate info and to plot. Defaults to -6. |
maxTheta |
The largest value of ability PDF to calculate info and to plot. Defaults to 6. |
stepTheta |
The increment to iterate over the ability PDF. Defaults to 0.01. |
anItem <- matrix(c(0,0,0,1,1,1,0,1), nrow = 2, byrow = TRUE) testInfoOverTheta(list(anItem))
anItem <- matrix(c(0,0,0,1,1,1,0,1), nrow = 2, byrow = TRUE) testInfoOverTheta(list(anItem))
Generates Thurstonian Thresholds (sometimes called gammas) to an item. Thurstonian thresholds are the location on the trait/scale at which the cumulative probability of being in category k, or any higher category equals some probability (usually 0.5, the default). Thurstonian thresholds are considered a way of describing the difficulty of polytomously scored items and are usually the value used in visualisations like Wright maps. Thurstonian thresholds can only be calculated for items where response categories are scored such that each category can be placed in an order increasing scores (e.g., no ties as per the Ordered Partition model)
thrstThrsh(myItem, threshP = 0.5, minTheta = -20, maxTheta = 20, convC = 1e-05)
thrstThrsh(myItem, threshP = 0.5, minTheta = -20, maxTheta = 20, convC = 1e-05)
myItem |
A matrix of parameters for a single item of the structure used in |
threshP |
The probability at which the threshold is calculated (defaults to the usual value of 0.5) |
minTheta |
The lower-bound starting value of the split-half search used to find the threshold for the category. |
maxTheta |
The upper-bound starting value of the split-half search used to find the threshold for the category. |
convC |
The convergence criteria used to determine when the threshold has been found. The difference between
|
A k-1 by 1 matrix with Thurstonian thresholds for this item. Values are NA when the threshold cannot be calculated.
myItem <- matrix( c( 0, -0.58 , 0 , 1, # delta+tau thurst thresh (gamma) 1, -0.58 , 0.776 , 1, # 0.196 -1.14 2, -0.58 , -0.697 , 1, # -1.277 -0.93 3, -0.58 , -0.629 , 1, # -1.209 -0.64 4, -0.58 , 0.55 , 1 # -0.03 0.25 ), ncol =4, byrow=TRUE ) thrstThrsh(myItem)
myItem <- matrix( c( 0, -0.58 , 0 , 1, # delta+tau thurst thresh (gamma) 1, -0.58 , 0.776 , 1, # 0.196 -1.14 2, -0.58 , -0.697 , 1, # -1.277 -0.93 3, -0.58 , -0.629 , 1, # -1.209 -0.64 4, -0.58 , 0.55 , 1 # -0.03 0.25 ), ncol =4, byrow=TRUE ) thrstThrsh(myItem)
Helper function to Transform PVs onto a new metric (e.g., PISA Mean = 500, SD = 100). Uses the method described in the PISA 2012 technical manual.
transformPvs(data, mT = 0, sdT = 1, weights = 1)
transformPvs(data, mT = 0, sdT = 1, weights = 1)
data |
A data frame or matrix that contains the PVs |
mT |
The desired mean of the PVs |
sdT |
The desired sd of the PVs |
weights |
a vector of weights, the same length as |
a List of transformed PVs with as many elements as PVs were listed in 'x'.
Writes a fixed width text file in the format required for the
ACER ConQuest command and argument import anchor_xsi
. Can also be used
for initial values, though caution should be used with the interpretation
of the argument lconstraint
which should relate to the model of interest
ACER ConQuest
Currently only works with implicit variables. Explicit variables may be added in the future.
writeImportXsi(items, bmatix = 1L, lconstraint = "none", file)
writeImportXsi(items, bmatix = 1L, lconstraint = "none", file)
items |
a list of item matrices |
bmatix |
either the integer 1L for a unidimensional model, or a matrix, items by dimensions with 1L representing that the item in on this dimension, and a 0 otherwise. |
lconstraint |
the identification constraint in use, one of "none", "items", or "cases". |
file |
a path and filename to write file to disk. #' @return invisibly returns path of file written to disk) |
simplef()
, genResponses()
, browseVignettes("conquestr")
myItem <- matrix(c(0, 0, 0, 0, 1, 1, 0, 1), ncol = 4, byrow = TRUE) myItems <- list(myItem, myItem) myItems[[2]][2, 2] <- -1 # make the second item delta equal to -1 myResponses <- genResponses(abilities = rnorm(100), itemParams = myItems)
myItem <- matrix(c(0, 0, 0, 0, 1, 1, 0, 1), ncol = 4, byrow = TRUE) myItems <- list(myItem, myItem) myItems[[2]][2, 2] <- -1 # make the second item delta equal to -1 myResponses <- genResponses(abilities = rnorm(100), itemParams = myItems)