View source: R/plot_likelihood.R
plot_likelihood | R Documentation |
Scatter plot with likelihood superimposed.
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)),
...
)
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. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.