% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot.lsirm.R
\name{plot}
\alias{plot}
\title{Plotting the interaction map or summarizing the parameter estimate of fitted LSIRM with box plot.}
\usage{
plot(
  object,
  ...,
  option = "interaction",
  rotation = FALSE,
  cluster = NA,
  which.clust = "item",
  interact = FALSE,
  chain.idx = 1
)
}
\arguments{
\item{object}{Object of class \code{lsirm}.}

\item{...}{Additional arguments for the corresponding function.}

\item{option}{Character; If value is "interaction", draw the interaction map that represents interactions between respondents and items. If value is "beta", draw the boxplot for the posterior samples of beta. If value is "theta", draw the distribution of the theta estimates per total test score for the \code{data}. If value is "alpha", draw the boxplot for the posterior samples of alpha. The "alpha" is only available for 2PL LSIRM.}

\item{rotation}{Logical; If TRUE the latent positions are visualized after oblique (oblimin) rotation.}

\item{cluster}{Character; clustering method for the interaction map. Use \code{"neyman"} for Neyman-Scott/Thomas point-process clustering or \code{"spectral"} for spectral clustering. If \code{NA}, no clustering is applied. Default is \code{NA}.}

\item{which.clust}{Character; latent positions to cluster when \code{cluster} is \code{"neyman"} or \code{"spectral"}. Use \code{"item"} to cluster item positions (\code{w_estimate}) or \code{"resp"} to cluster respondent positions (\code{z_estimate}). Default is \code{"item"}.}

\item{interact}{Logical; If TRUE, draw the interaction map interactively.}

\item{chain.idx}{Numeric; Index of MCMC chain. Default is 1.}
}
\value{
\code{plot} returns the interaction map or boxplot for parameter estimate.
}
\description{
\link{plot} is used to plot the interaction map of fitted LSIRM or summarizing the parameter estimate of fitted LSIRM with box plot.
}
\examples{
\donttest{

# generate example item response matrix
data     <- matrix(rbinom(500, size = 1, prob = 0.5), ncol=10, nrow=50)
lsirm_result <- lsirm(data ~ lsirm1pl())
plot(lsirm_result)

# use oblique rotation
plot(lsirm_result, rotation = TRUE)

# interaction map interactively
plot(lsirm_result, interact = TRUE)

# clustering the respondents or items
plot(lsirm_result, cluster = "spectral", which.clust = "item")
plot(lsirm_result, cluster = "spectral", which.clust = "resp")
}
}
