plot_likelihood: Scatter plot with likelihood superimposed.

View source: R/plot_likelihood.R

plot_likelihoodR Documentation

Scatter plot with likelihood superimposed.

Description

Scatter plot with likelihood superimposed.

Usage

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.

intercept

the intercept from the model.

slope

the slope from the model.

sigma

the root mean square error

...

currently not used.


jbryer/VisualStats documentation built on Feb. 27, 2025, 6:19 p.m.