Skip to contents

Draws one surface from loglik_surface() for each assumed lower asymptote (guessing value), in different colours on one vertical scale, each with a dot at its highest point. The legend gives the guessing value of each colour, and a click on an entry hides or shows that surface.

Usage

plot_loglik_surfaces(
  surfaces,
  guesses = seq(0.05, 0.6, by = 0.05),
  a = attr(surfaces[[1]], "a"),
  b = attr(surfaces[[1]], "b")
)

Arguments

surfaces

List of log-likelihood matrices, one for each value of guesses, on the same grids.

guesses

The lower asymptotes assumed for the surfaces.

a, b

The grids of discriminations and difficulties of the surfaces; by default those that loglik_surface() keeps with them.

Value

A plotly object.

Examples

set.seed(1)
theta <- seq(-3, 3, length.out = 50)
grid <- seq(-3, 3, by = 0.15)
guesses <- c(0.1, 0.3, 0.5)
responses <- simulate_responses(theta, a = 1, b = -0.5, c = 0.4)
surfaces <- lapply(guesses, function(g) loglik_surface(responses, theta, grid, grid, c = g))
plot_loglik_surfaces(surfaces, guesses)