plot_t | R Documentation |
Draw a t distribution curve and optional shading of a particular region.
plot_t( df, shadeValues = NULL, direction = c("less", "greater", "beyond", "between"), col.shade = "cornflowerblue", ... )
df |
The degrees of freedom of the t distribution to plot |
shadeValues |
Either a single number or a vector of two numbers which identify the boundary or boundaries of the shaded region |
direction |
A character string (in quotes) indicating the direction from
shadeValues to shade under the normal curve. Must be one of " |
col.shade |
The color of the shaded region |
... |
Other graphical parameters passed to plot (e.g.,
|
The direction
argument is used to control the region under
the normal distribution curve which is shaded. If shadeValues
is a
single number, direction
must be either "less
" (in which case
the shaded region will be to the left of shadeValues
) or
"greater
" (the shaded region will be to the right of
shadeValues
).
If shadeValues
is a vector, then direction
must be either "between
"
(the region between the two numbers in shadeValues
will be shaded) or
"beyond
" (the region below the smaller and above the larger of the
shadeValues
will be shaded).
A plot of a normal distribution curve with optional shading.
plot_norm
# Shade the region below 1.4 on the t(4) distribution. plot_t(df = 4, shadeValues = 1.4, direction = "less") # Shade the region between -2 and 0.5 on the t(13) distribution. plot_t(df = 13, shadeValues = c(-2, 0.5), direction = "between")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.