Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

qqmat

Q-Q plot to assess normality of data


Description

qqmat plots Mahalanobisdistances of a given sample against those expected from a Gaussian distribution

Usage

qqmat(x, output = FALSE, square = FALSE)

Arguments

x

sample data: matrix or vector

output

logical: if TRUE results are returned

square

plot in a square window - outliers might be cut off.

Value

if output=TRUE, the following values are returned

x

distances from an expected Gaussian distribution

y

observed distances - sorted

d

observed distances - unsorted

Author(s)

Stefan Schlager

See Also

Examples

require(MASS)
### create normally distributed data
data <- mvrnorm(100,mu=rep(0,5),Sigma = diag(5:1))
qqmat(data)

###create non normally distributed data
data1 <- rchisq(100,df=3)
qqmat(data1,square=FALSE)

Morpho

Calculations and Visualisations Related to Geometric Morphometrics

v2.8
GPL-2
Authors
Stefan Schlager [aut, cre, cph], Gregory Jefferis [ctb], Dryden Ian [cph]
Initial release
2020-02-26

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.