View source: R/plot_sampling_distribution.R
plot_sampling_distribution | R Documentation |
Provides a wrapper for plotting a model for the sampling distribution of a parameter estimate in a linear model.
plot_sampling_distribution(
estimates,
parameter,
show.confidence.interval = FALSE
)
estimates |
result of a call to |
parameter |
character string indicating for which parameter the modeled
sampling distribution should be plotted. This should match the output of the
"term" column in |
show.confidence.interval |
boolean indicating whether the confidence
region should be constructed on the graphic. If |
The estimate_parameters
function returns an attribute that
contains a random sample from the sampling distribution of the parameter
estimate. This is extracted and used to construct a graphic summarizing
this distribution.
ggplot2
object.
estimate_parameters
fit <- lm(mpg ~ hp, data = mtcars)
samp_distn <- estimate_parameters(fit,
confidence.level = 0.95,
assume.constant.variance = TRUE,
assume.normality = FALSE)
plot_sampling_distribution(samp_distn,
show.confidence.interval = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.