Plot log-likelihood surfaces for several lower asymptotes
Source:R/fct_plots.R
plot_loglik_surfaces.RdDraws 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.
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.
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)