% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sim.data.FCMIRT.R
\name{sim.data.FCMIRT}
\alias{sim.data.FCMIRT}
\title{Simulate FCMIRT Data}
\usage{
sim.data.FCMIRT(
  N.person = 1000,
  N.block = 10,
  I.block = 2,
  D = 3,
  model = "m2pl",
  fc.type = "RANK",
  control = NULL
)
}
\arguments{
\item{N.person}{Number of persons.}

\item{N.block}{Number of forced-choice blocks.}

\item{I.block}{Number of items per block when \code{control$block.items} is
not supplied.}

\item{D}{Number of latent dimensions. If \code{control$Q.matrix} is supplied,
\code{D} is reset to \code{ncol(control$Q.matrix)}.}

\item{model}{MIRT model type: \code{"m1pl"}, \code{"m2pl"}, \code{"m3pl"}, or
\code{"m4pl"}.}

\item{fc.type}{Forced-choice response type: \code{"RANK"}, \code{"MOLE"}, or
\code{"PICK"}. A scalar value is recycled to all blocks.}

\item{control}{Optional list. Supported entries are \code{Q.matrix},
\code{block.items}, and \code{Corr}.}
}
\value{
An object of class \code{"data.FCMIRT"}, a list containing
\code{data}, \code{response}, \code{theta}, \code{par}, \code{Q.matrix},
\code{block.items}, \code{Corr}, \code{model}, \code{patterns},
\code{patterns.total}, \code{probability}, \code{prob}, and
data-generating arguments.
}
\description{
Simulates forced-choice ranking data using a MIRT item response model
(\code{"m1pl"} through \code{"m4pl"}) as the item-level endorsement model.
Forced-choice responses are generated by applying the sequential
Luce/Plackett choice rule to the logits of the item-level endorsement
probabilities, with RANK, MOLE, and PICK patterns handled by
\code{\link{model.FCMIRT}}.
For identification, item difficulty/intercept parameters \code{b} are
centered within each forced-choice block so that their block sum is zero.
}
\examples{
set.seed(123)
sim <- sim.data.FCMIRT(N.person = 20, N.block = 3, I.block = 2,
                       D = 2, model = "m2pl", fc.type = "RANK")
str(sim$data)
head(sim$response)
dim(sim$prob)

}
\seealso{
\code{\link{fit.FCMIRT}}, \code{\link{model.FCMIRT}}
}
