Learn R Programming

solarius (version 0.3.0.2)

plotRes: Plot the residuals of a polygenic model

Description

Plot the residuals on scatter or quantile-quantile plots.

Usage

plotRes(x, labels = FALSE, text.size = 4, ...)
plotResQQ(x, distribution = "norm", ..., line.estimate = NULL, conf = 0.9, labels = FALSE, text.size = 4)

Arguments

x
An object of class solarPolygenic.
labels
A logical value for plotRes function, indicating if the labels of IDs (which residuals are outside the 3 * sd interval) are to be plotted. A logical value for plotResQQ function, indicating if the samples (their IDs) outside the confidence intervals are to be plotted.
text.size
An integer, the text size of labels.
...
additional arguments.
distribution
A character, name of distribution of the residuals. The default value is "norm".
line.estimate
Function for estimation of QQ-line.
conf
A numeric value between 0 and 1, that represents the confidence boundary.

Details

plotRes function makes a scatter plot of fitted values vs. residuals. Note that the residuals returned by SOLAR include both random effects, i.e. house-hold, genetic and residuals itself.

plotResQQ function plots quantile-quantile (QQ) plot of the residuals.

See Also

solarPolygenicClass

Examples

Run this code
## Not run: 
# ### basic (univariate) polygenic model
# mod <- solarPolygenic(trait1 ~ age + sex, dat30)
# 
# plotRes(mod)
# 
# plotResQQ(mod)
# 
# ## End(Not run)

Run the code above in your browser using DataLab