Learn R Programming

sitar (version 1.0.4)

codeplot: Plot and zap velocity outliers in growth curves

Description

Handles output from velout function to display growth curves with outlying points, either plotting or zapping the outliers.

Usage

codeplot(outliers, icode = 4, ..., print = TRUE)
zapvelout(outliers, icode)

Arguments

outliers
Data frame returned from velout.
icode
The code number(s) defining the subset of curves to be displayed or zapped (between 1 and 6).
...
Optional plot parameters.
print
Option to print as well as plot information on each curve.

Value

  • codeplot returns summary information on each curve with an outlier of the relevant code, and optionally plots the curve. zapvelout sets to NA values of y whose code is contained in icode, and returns the modified data frame.

Details

The function velout identifies putative outliers for y in data, codeplot plots them, and zapvelout sets missing those confirmed as outliers. Codes range from 0 (normal) to 8, where 4 and 6 are conventional outliers (see velout).

See Also

velout

Examples

Run this code
## identify outliers
outliers <- velout(age, height, id, heights, limit=2)

## plot outliers with code 4 or 6
codeplot(outliers, icode=c(4,6))

## set the 8 outliers missing
newheights <- zapvelout(outliers, icode=6)

Run the code above in your browser using DataLab