https://github.com/cran/mirtCAT
Tip revision: 8a6813a353720a2547dcda5c0d2e4256a8f2a319 authored by Phil Chalmers on 14 August 2014, 22:21:49 UTC
version 0.1
version 0.1
Tip revision: 8a6813a
generate_pattern.Rd
% Generated by roxygen2 (4.0.1): do not edit by hand
\name{generate_pattern}
\alias{generate_pattern}
\title{Generate a CAT pattern}
\usage{
generate_pattern(mirt_object, Theta, choices = NULL, item_answers = NULL)
}
\arguments{
\item{mirt_object}{single group object defined by the \code{mirt} package}
\item{Theta}{a numeric vector indicating the latent theta values for a single person}
\item{choices}{a list of character vectors signifying the possible choices for each item.
If NULL, a numeric vector is returned indicating the selected category for each item (where
0 is the lowest possible category)}
\item{item_answers}{(optional) a character vector indicating which of the options in
\code{choices} should be considered the 'correct' answer. This is required for item types that
dichotomously score items (e.g., multiple choice items scored with the 3PL model)}
}
\description{
Generate a CAT pattern given various inputs. Returns a character or numeric vector
with length equal to the test size.
}
\examples{
\dontrun{
# return real response vector given choices and (optional) answers
pat <- generate_pattern(mod, Theta = 0, choices = choices, item_answers=answers)
# mirtCAT(questions, mirt_object=mod, local_pattern = pat)
# generate pattern where 0 is the lowest possible response category
pat2 <- generate_pattern(mod, Theta = 0)
# mirtCAT(mirt_object=mod, local_pattern = pat2)
}
}
\author{
Phil Chalmers \email{rphilip.chalmers@gmail.com}
}
\seealso{
\code{\link{mirtCAT}}
}