Skip to contents

Draws a matrix from prob_mirt() or info_mirt() as an interactive 3-D surface, coloured from purple (low) to yellow (high), that can be rotated and zoomed with the mouse.

Usage

plot_mirt_surface(
  theta1,
  theta2,
  z,
  xlab = NULL,
  ylab = NULL,
  zlab = "P(Y=1)",
  zrange = c(0, 1),
  eye = list(x = 1.5, y = -1.5, z = 1.5)
)

Arguments

theta1, theta2

Abilities on the two dimensions.

z

Matrix with one row for each value of theta1 and one column for each value of theta2.

xlab, ylab, zlab

Titles of the axes; NULL labels the abilities with the Greek letter theta, as theta1 and theta2.

zrange

Range of the vertical axis, or NULL to fit the surface.

eye

Position of the camera, as in plotly's scene.camera.eye.

Value

A plotly object.

Examples

theta <- seq(-4, 4, length.out = 50)
plot_mirt_surface(theta, theta, prob_mirt(theta, theta))
plot_mirt_surface(theta, theta, info_mirt(theta, theta), zlab = "Information", zrange = NULL, eye = list(x = -1.5, y = 1.5, z = 1.5) )