calcslice: Negative log-likelihood slice

View source: R/emdbook.R

calcsliceR Documentation

Negative log-likelihood slice

Description

Calculate the negative log-likelihood along a line connecting two mle fits

Usage

calcslice(fit1, fit2, fn = fit1@minuslogl, range = c(-0.1, 1.1), n = 400)

Arguments

fit1

An mle object

fit2

Another mle object

fn

Negative log-likelihood function

range

Numeric vector: range of parameters to try, where 0 corresponds to coef(fit1) and 1 corresponds to coef(fit2)

n

Number of points to evaluate

Details

Calculates the negative log-likelihood (not a profile, just a "slice") along the line connecting the two sets of coefficients. Intended for diagnosing and visualizing multiple minima in a likelihood surface, especially in higher-dimensional models.

Value

x

Parameter values, along the 0-1 scale described above

y

Negative log-likelihood values

Author(s)

Ben Bolker


bbolker/emdbook documentation built on July 4, 2023, 1:16 p.m.