codeplot: Plot and zap velocity outliers in growth curves

View source: R/sitarlib.R

codeplotR Documentation

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.

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).

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.

Author(s)

Tim Cole tim.cole@ucl.ac.uk

See Also

velout

Examples


## 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)


statist7/sitar documentation built on Feb. 7, 2024, 2:08 a.m.