Test for normality of the trait/phenotype

Share:

Description

Test for normality of the trait

Usage

1
Normality.test(y = NULL, X = NULL, pedigree = NULL, plot = FALSE)

Arguments

y

vector of phenotype data (one entry per individual), of length n.

X

matrix of covariates including intercept (dimension: n \times p, with p the number of covariates)

pedigree

a pedigree as output by read.pedigree. This is a data frame consisting of four columns (family ID, individual ID, father ID and mother ID) as use in the traditional linkage format and e.g. Plink files.

plot

(logical) If set to TRUE a histogram will be plotted of the phenotype residuals after adjusting for covariates (default: FALSE).

Details

This function is used to test whether the phenotype is distributed normally, based on the Shapiro-Wilk test.

Value

A list with the following elements:

  • SW.pvalue: Shapiro-Wilk p-value that indicates whether the phenotype is distributed normally.

  • resid.0: the residuals after regressing the phenotype onto X.

Author(s)

Karim Oualkacha

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.