plot_t_value.Rd
Plot t-distribution and visualize two-tailed p-value for a given t-statistic and degrees of freedom
plot_t_value(t_value, dof, fill = "grey35", color = "grey35", alpha = 1)
dof | degrees of freedom |
---|---|
fill | fill of the shaded area underneath the distribution for a given t-value. Defaults to "grey35" (ggplot2 default) |
color | color of the outline of the kernel density. Defaults to "grey35" (ggplot2 default) |
t-value | a value from the Student's T distribution |
ggplot
object
add switch to plot standard normal and calculate p-values instead of t-distribution
Lawrence R. De Geest
# plot t distribution for 100 degrees of freedom, then calculate and shade-in the p-value for t = 1.25 plot_t_value(t_value = 1.25, dof = 100)