diff --git a/DESCRIPTION b/DESCRIPTION index 762d23b..d43b6b3 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -40,5 +40,5 @@ Suggests: MplusAutomation Encoding: UTF-8 Language: en-US -RoxygenNote: 7.2.3 +RoxygenNote: 7.3.1 Config/testthat/edition: 3 diff --git a/R/expand_responses.R b/R/expand_responses.R index 572da47..db9eee2 100644 --- a/R/expand_responses.R +++ b/R/expand_responses.R @@ -23,7 +23,8 @@ expand_responses <- function(responses, scoringMatrix) { !duplicated(rownames(scoringMatrix)), !is.null(colnames(scoringMatrix)), !duplicated(colnames(scoringMatrix)), - all(setdiff(unique(unlist(sapply(responses, unique))), NA) %in% + "All values occuring in the 'response' argument must match some name of the scoring matrix." = + all(setdiff(unique(unlist(sapply(responses, unique))), NA) %in% rownames(scoringMatrix))) responses <- as.matrix(responses) diff --git a/R/generate_item_parameters.R b/R/generate_item_parameters.R index b47884f..5a8fae4 100644 --- a/R/generate_item_parameters.R +++ b/R/generate_item_parameters.R @@ -218,7 +218,7 @@ generate_slopes <- function(nItems, scoringMatrix, ..., FUN = identity, #' by a set of \emph{intercept} parameters describing relative frequency of #' specific categories of the response scale. However, it is convenient to #' define model parameters in another parameterisation, in which item -#' \emph{thresholds} describe {difficulty} of switching between consecutive +#' \emph{thresholds} describe \emph{difficulty} of switching between consecutive #' categories of the response scale, and only then transform these #' \emph{thresholds} to \emph{intercepts}. Function follows this approach and: #' 1) first generates general \emph{difficulties} of the whole items, then diff --git a/R/make_item.R b/R/make_item.R index fee6724..9e83c35 100644 --- a/R/make_item.R +++ b/R/make_item.R @@ -11,7 +11,7 @@ #' traits scoring patterns that will be returned by functions provided with #' arguments \code{scoringOnPreviousResponses} or \code{editResponse}) #' @param intercepts a numeric vector of intercept parameters (must be shorter -#' of one than number of rows in the \\code{scoringMatrix} or the same length +#' of one than number of rows in the \code{scoringMatrix} or the same length #' but with the first element being 0) #' @param mode the way the item should be answered - see #' \code{\link{generate_item_responses_sqn}} for "irtree" and diff --git a/man/generate_intercepts.Rd b/man/generate_intercepts.Rd index f1014d2..e87f36e 100644 --- a/man/generate_intercepts.Rd +++ b/man/generate_intercepts.Rd @@ -74,7 +74,7 @@ Assuming \emph{GPCM} response process test item must be characterized by a set of \emph{intercept} parameters describing relative frequency of specific categories of the response scale. However, it is convenient to define model parameters in another parameterisation, in which item -\emph{thresholds} describe {difficulty} of switching between consecutive +\emph{thresholds} describe \emph{difficulty} of switching between consecutive categories of the response scale, and only then transform these \emph{thresholds} to \emph{intercepts}. Function follows this approach and: 1) first generates general \emph{difficulties} of the whole items, then diff --git a/man/make_item.Rd b/man/make_item.Rd index 5b42617..f8f89a3 100644 --- a/man/make_item.Rd +++ b/man/make_item.Rd @@ -26,7 +26,7 @@ traits scoring patterns that will be returned by functions provided with arguments \code{scoringOnPreviousResponses} or \code{editResponse})} \item{intercepts}{a numeric vector of intercept parameters (must be shorter -of one than number of rows in the \\code{scoringMatrix} or the same length +of one than number of rows in the \code{scoringMatrix} or the same length but with the first element being 0)} \item{mode}{the way the item should be answered - see