How to create an interval estimate based on being within some percentage of the maximum value of the likelihood function? When we do maximum likelihood estimation of a (let's say scalar) parameter $\theta$, we get a point estimate wherever the likelihood function is maximized. However, if we want an interval estimate, the points giving nearly maximum likelihoods seem like good candidates for points to include in the interval estimate.


*

*(Main question) Is there a way to relate something like confidence level (I think I mean inverting the interval to give a hypothesis test) to give an interval estimate based on some criteria like, "I want all points that give likelihood within $\text{x}\%$ of the maximum likelihood"?

*If we form a confidence interval based on inverting an $\alpha$-level likelihood ratio test, is that basically what we're doing?
It would be nice to have decent conditions that will assure the interval estimate is indeed a connected interval, but that is of secondary importance.  
EDIT
Here is a sketch of the situation. I mean the interval between the red vertical lines., where the red horizontal line is $\text{x}\%$ of the maximum value of the purple likelihood function.

 A: The likelihood function $L(\theta)$ provides us with both, a point estimator and a confidence set estimator for $\theta$. In particular, to make things simple, let $X_1,\ldots, X_n$ be an i.i.d. random sample from a model having pdf $f_\theta$, with $\theta\in \mathbb{R}$.
The Maximum Likelihood Estimator is defined as
$$
\hat \theta = \underset{\theta\in\Theta}{\arg \max}\, L(\theta),
$$
or, under appropriate smoothing conditions, as the solution to the likelihood equation
$$
\frac{d\ell(\theta)}{d\theta} = 0,
$$
where $\ell(\theta) = \log L(\theta)$. Under appropriate conditions, and
if $\theta$ is the true parameter, we have
\begin{align}\label{1}
\Lambda_n(\theta) = -2(\ell(\theta)-\ell(\hat\theta)) &\overset{d}\to \chi_1^2,\quad\quad\text{(*)}
\end{align}
that is to say
$$
\Lambda_n(\theta)\,\,\dot\sim\,\, \chi_1^2
$$
where the symbol "$\,\dot\sim\,$" means "asymptotically as $n\to\infty$ distributed as".
The point here is that $\Lambda_n(\theta)$ provides an asymptotic pivotal quantity, which we can use to do hypothesis testing and build confidence sets. To go straight on to the matter of your post, I'll focus here on the latter.
By definition, a confidence set of level $1-\alpha$ is a random set which traps the true value with a probability no lower than $1-\alpha$. Thus if $C_{1-\alpha}$ is some set s.t.
$$
P_{\theta}(\Lambda_n(\theta)\in C_{1-\alpha})\geq 1-\alpha,\quad\forall\theta,
$$
then the set
$$
\{\theta:\Lambda_n(\theta)\in C_{1-\alpha}\}
$$
forms a (random) confidence set with probability coverage $1-\alpha$. The set $C_{1-\alpha}$ can be determined in different ways, but the usual approach is to use the threshold $\chi_{1,1-\alpha}^2$, and look for values of $\Lambda_n(\theta)$ that are below $\chi_{1,1-\alpha}^2$. Indeed, for every fixed $\theta$,
$$
P_\theta(\Lambda_{n}(\theta) \leq \chi_{1,1-\alpha}^2)\,\, \dot=\,\, 1-\alpha
$$
where $\chi_{1,1-\alpha}^2$ is the upper $\alpha$th level quantile of the $\chi_1^2$ distributions. The usual likelihood-based confidence set is thus
$$
\{\theta:\Lambda_n(\theta)\leq \chi_{1,1-\alpha}^2\}.
$$
The R-example below illustrates this in the case of $f_\theta$ being the Poisson distribution. In the figure, the horizontal dashed line represents the 0.95th quantile of $\chi_1^2$ distribution, and the dashed vertical lines mark the limits of the confidence set, which in this case happens to be an interval.
library(latex2exp)

# fix some observed data
y <- c(5, 4, 1, 0, 0, 1, 1, 2, 1, 1)

# the log-likelihood function
llik <- function(lambda, y){
  oo = dpois(y, lambda = lambda, log = TRUE)

  return(sum(oo))
}

ybar <- mean(y)

x <- seq(.1, 4, len=100)
ll <- sapply(x, function(x) llik(x,y=y))

llikv <- Vectorize(function(x) llik(x,y=y), "x")

lo <- uniroot(function(x) 2*(llik(ybar, y)-llikv(x))-qchisq(0.95, df=1),
        lower = 0.1, upper = ybar)
up <- uniroot(function(x) 2*(llik(ybar, y)-llikv(x))-qchisq(0.95, df=1),
              lower = ybar, upper=4)


plot(y = 2*(llik(ybar, y)-ll), x=x,
     type="l", ylab=NA,
     xlab = expression(theta),
     xlim=c(0.1,4))
abline(v = ybar, lwd=2, lty="dotted")
mtext(TeX("$\\widehat{\\theta}$"),side=1, at=1.6,padj = 1)
abline(h = qchisq(0.95, df=1), lwd=2, lty=2, col="gray")
segments(x0=lo$root, x1=lo$root,y0=-1.5,y1=8+qchisq(0.95, df=1), lwd=2, lty=2)
segments(x0=up$root, x1=up$root,y0=-1.5,y1=8+qchisq(0.95, df=1), lwd=2, lty=2)
mtext(TeX("$\\chi_{1,.05}^2$"),
      side=1,
      at=3,padj = -2.5,las=1,adj=0)
mtext("95% lik. conf. set",
      side=1,
      at=1,padj = -4.5,las=1,adj=0)
text(x = 0.5, y=50,TeX("$2(l(\\widehat{\\theta})-l(\\theta))$"))


A: Under some conditions you can show that the MLE of a parameter has the following distribution: $\sqrt n (\hat\theta-\theta)\sim\mathcal N(0,\hat\sigma^2)$, where $\hat\sigma^2$ is the corresponding estimate of the variance. The variance estimate $\hat\sigma^2/n$ can be used to estimate the confidence interval of the parameter estimate $\hat\theta$. The variance estimate is related to the Fisher information of the distribution (likelihood) function.
A: You have likelihood intervals/regions and confidence intervals/regions. They are different.
Confidence intervals stem from the fiducial distribution, which is a different thing from the likelihood function.


If we form a confidence interval based on inverting an $\alpha$-level likelihood ratio test, is that basically what we're doing?

The likelihood ratio test is using a likelihood ratio instead of a likelihood function. The goal is to make a hypothesis test that is most powerful for some alternative hypothesis.

*

*The likelihood ratio is a function of the data (given a null hypothesis $\theta_0$ and alternative hypothesis $\theta_a$) $$\Lambda(x|\theta_0,\theta_a) = \frac{\mathcal{L}(\theta_0|x)}{\mathcal{L}(\theta_a|x)}$$

*The likelihood or relative likelihood is a function of the distribution parameter (given data $x$). $$\mathcal{L}_{\text{relative}}(\theta|x) = \frac{\mathcal{L}(\theta|x)}{\mathcal{L}(\hat\theta_{ML}|x)}$$ it scales the likelihood function $\mathcal{L}(\theta|x)$ by the maximum $\mathcal{L}(\hat\theta_{ML}|x)$
The likelihood ratio $\Lambda(x)$ is a way to define a hypothesis test, and that hypothesis test can be used to define a confidence interval. But,

*

*the bounds for the values $\Lambda(x)$ that cover $\alpha\%$ of the distribution $\Lambda(x)$
are different from

*

*the bounds for the values $\theta$ that cover $\alpha\%$ of the distribution $\mathcal{L}_{\text{relative}}(\theta)$
In the question The basic logic of constructing a confidence interval the use of the likelihood function to construct a confidence interval is discussed. A condition for the two being the same is:

When are the two methods the same?
This horizontal vs vertical is giving the same result, when the boundaries $U$ and $L$, that bound the intervals in the plot $\theta$ vs $\hat \theta$ are iso-lines for $f(\hat \theta ; \theta)$. If boundaries are everywhere at the same height than in neither of the two directions you can make an improvement.

Or in other words when $\partial_{\hat\theta}f(\hat \theta ; \theta) = -\partial_{\theta}f(\hat \theta ; \theta)$ and the likelihood distribution and fiducial distribution coincidence.
This happens in the case described utobi. In the limit of sample size $n\to\infty$ the likelihood function becomes equivalent to a shifted chi-square distribution and the bounds of the likelihood and confidence interval (based on highest density) start to coincide and the likelihood interval can be interpreted gains (approximately) the properties a confidence interval.
A: TL;DR I use an example — inference for the rate $\theta$ in a Poisson model — to show how to construct a likelihood interval. I've borrowed this example from the book In All Likelihood: Statistical Modelling And Inference Using Likelihood by Yudi Pawitan.
Say we observe $x = 3$ from $\operatorname{Poisson}(\theta)$. The likelihood interval for the rate $\theta$ is:
$$
\begin{aligned}
\left\{\theta:\frac{L(\theta)}{L(\widehat{\theta})} > c\right\}
\end{aligned}
$$
where $\widehat{\theta}$ is the maximum likelihood estimate (MLE) and the likelihood is scaled so that the maximum is 1, which occurs at $\theta=\widehat{\theta}$; $c$ is a cutoff point (between 0 and 1; to be chosen next). In his answer @SextusEmpiricus refers to $L(\theta) / L(\widehat{\theta})$ as the relative likelihood.
This formalizes the concept of the likelihood "within some percentage of the maximum value" $L(\widehat{\theta})$: the likelihood interval is the set of parameter values $\theta$ with high likelihood. But how can we decide what is "high enough", ie. how can we calibrate the likelihood?
As @utobi explains, under regularity conditions, the likelihood ratio $2\log L(\widehat{\theta}) / L(\theta)$ has (approximately) Chi-squared distribution. Therefore, when the likelihood is reasonably regular:
$$
\begin{aligned}
P\left\{\frac{L(\theta)}{L(\widehat{\theta})} > c\right\}
= P\left\{2\log\frac{L(\widehat{\theta})}{L(\theta)} < - 2\log c\right\}
= P\left\{\chi^2_1 < -2\log c\right\}
\end{aligned}
$$
If we want to choose $c$, so that the likelihood interval has approximate $(1-\alpha)$100% coverage probability, then $P(\chi^2_1 < -2\log c) = 1 - \alpha \Leftrightarrow c = \exp\left\{-\frac{1}{2}\chi^2_{1,1-\alpha}\right\}$.
Here is a plot of the (scaled) likelihood $L(\theta)/L(\widehat{\theta})$ as well as the likelihood interval calibrated to have 95% coverage probability.

# significance level
alpha <- 0.05
# corresponding cutoff
c <- exp(-qchisq(1 - alpha, 1) / 2)

x <- 3
theta <- seq(0, 10, len = 10000)
loglike <- dpois(x, theta, log = TRUE)

# Compute a likelihood interval with (1-alpha)100% coverage.
# See Example 5.14, "In All Likelihood"
likelihood_interval(theta, loglike, alpha)
#>   alpha    lower    upper
#>    0.05 0.746065 7.779286


R code to reproduce the figure and calculate the likelihood interval.
find_cutoff <- function(x, y, x0) {
  if (sum(x < x0) < 2) {
    return(min(x))
  } else {
    return(approx(y[x < x0], x[x < x0], xout = 0)$y)
  }
}

# Compute likelihood interval for a scalar theta.
# This implementation is based on the program `li.r` for computing likelihood
# intervals which accompanies the book "In All Likelihood" by Yudi Pawitan.
# https://www.meb.ki.se/sites/yudpaw/book/
likelihood_interval <- function(theta, llike, alpha = 0.05) {
  # Scale the negative log-likelihood so that the minimum is 0
  nllike <- -2 * (llike - max(llike))
  # Find the MLE
  theta.mle <- mean(theta[nllike == 0])
  # Shift by the Chi-squared critical value
  nllike <- nllike - qchisq(1 - alpha, 1)

  lower <- find_cutoff(theta, nllike, theta.mle)
  upper <- -find_cutoff(-theta, nllike, -theta.mle)

  data.frame(alpha, lower, upper)
}

# significance level
alpha <- 0.05
# corresponding cutoff
c <- exp(-qchisq(1 - alpha, 1) / 2)

# An observation from Poisson(theta). We will do inference on theta.
x <- 3
theta <- seq(0, qpois(0.999, x), len = 10000)

# Compute a likelihood interval with (1-alpha)100% coverage.
# See Example 5.14, "In All Likelihood"

loglike <- dpois(x, theta, log = TRUE)
like.ci <- likelihood_interval(theta, loglike, alpha)
like.ci # approximate confidence interval based on the likelihood ratio statistic

# Scale the Poisson likelihood, so that the maximum is 1 at the MLE theta = x.
like <- exp(loglike - dpois(x, x, log = TRUE))
plot(
  theta, like,
  xlab = "θ", ylab = "L(θ)", ylim = c(0, 1),
  type = "l", xaxs = "i", yaxs = "i",  xaxt = "n"
)
axis(1, at = c(0, 2, 3, 4, 6, 8, 10), labels = c(0, 2, "", 4, 6, 8, 10))
abline(h = c, col = "gray62")
mtext("θ = 3", side = 1, at = x, padj = 1)
segments(
  like.ci$lower, c, like.ci$upper, c,
  col = "#2297E6", lwd = 3
)

title(
  paste(
    "95% likelihood interval [blue segment] for Poisson rate θ on observing x =", x
  ),
  font.main = 1
)

