This function will overlay multiple normal Q-Q plots on the same plot. This will be particularly useful when comparing the distribution between groups. In this situation, significantly different slopes would indicate the normal distributions for the groups do not share a common standard deviation.

group_qqnorm(x, group, line = NULL, alpha_point = 1, alpha_line = 1, ...)

Arguments

x

a numeric vector from which quantiles will be calculated

group

a vector indicating group membership for each value in x.

line

the method used to fit reference lines. If no reference lines are desired, leave the value as NULL. line = "rlm" will use robust regression to fit reference lines. line = "quantile" will fit lines through the first and third quartiles.

alpha_point

alpha value specified for the points

alpha_line

alpha value specified for the lines

...

other arguments to be passed to ggplot

References

Hilden-Minton, J. A. (1995) Mulilevel Diagnostics for Mixed and Hierarchical Linear Models, Ph.D. thesis, University of California Los Angeles.

Author

Adam Loy loyad01@gmail.com