
Last chance! 50% off unlimited learning
Sale ends in
Compare distribution of data with normal distribution.
check_normaldist(
res,
col = "red",
col.normal = "black",
legend.pos = "topright",
legend.label = "data",
...
)
Vector with residuals or other data for which the distribution .
Color for filling the area. Default is black.
Color for shading and line of normal distribution.
Position of legend, can be string (e.g., 'topleft') or an
xy.coords
object.
Text string, label for plotted data distribution.
Optional arguments for the lines. See par
.
Other Functions for plotting:
addInterval()
,
add_bars()
,
add_n_points()
,
alphaPalette()
,
alpha()
,
color_contour()
,
dotplot_error()
,
drawDevArrows()
,
emptyPlot()
,
errorBars()
,
fill_area()
,
getCoords()
,
getFigCoords()
,
getProps()
,
gradientLegend()
,
legend_margin()
,
marginDensityPlot()
,
plot_error()
,
plot_image()
,
plotsurface()
,
sortBoxplot()
# NOT RUN {
set.seed(123)
# normal distribution:
test <- rnorm(1000)
check_normaldist(test)
# t-distribution:
test <- rt(1000, df=5)
check_normaldist(test)
# skewed data, e.g., reaction times:
test <- exp(rnorm(1000, mean=.500, sd=.25))
check_normaldist(test)
# center first:
check_normaldist(scale(test))
# binomial distribution:
test <- rbinom(1000, 1, .3)
check_normaldist(test)
# count data:
test <- rbinom(1000, 100, .3)
check_normaldist(test)
# }
Run the code above in your browser using DataLab