plot_likelihood: Scatter plot with likelihood superimposed.

Description Usage Arguments

View source: R/plot_likelihood.R

Description

Scatter plot with likelihood superimposed.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
plot_likelihood(
  x,
  y,
  height = 0.4,
  k = 4,
  pt = 1,
  intercept = lm(y ~ x)$coefficients[1],
  slope = lm(y ~ x)$coefficients[2],
  sigma = sqrt(sum(resid(lm(y ~ x))^2)/length(x)),
  ...
)

Arguments

x

the predictor

y

the outcome

height

the proportion of the x-axis the distribution should occupy. That is, a height of 0.4 means the width of the distribution will occupy approximately 40 percent of the plot width.

k

the number of standard deviations to plot

pt

the point to highlight and draw the likelihood of.

sigma

the root mean square error


jbryer/visualMLE documentation built on Nov. 22, 2021, 12:18 a.m.