Skip to contents

Draws a surface from loglik_surface() in 3-D, with a red dot at its highest point: the maximum likelihood estimates of discrimination and difficulty.

Usage

plot_loglik_surface(loglik, a = attr(loglik, "a"), b = attr(loglik, "b"))

Arguments

loglik

Matrix of log-likelihoods, one row for each value of a and one column for each value of b.

a, b

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

Value

A plotly object.

Examples

set.seed(1)
theta <- seq(-3, 3, length.out = 50)
plot_loglik_surface(loglik_surface(simulate_responses(theta, a = 1, b = -0.5), theta))