velout(x, y, id, data, lag = 1, velpower = 0.5, limit = 5,
linearise = FALSE)
Code is a factor taking values between 0 and 8, with 0 normal (see table below).
Values 1-6 depend on the pattern of abnormal velocities, while 7 and 8 indicate
a duplicate age (7 for the first in an individual and 8 for later ones). Edge
outliers, i.e. first or last for an individual, have just one velocity. Code 4
indicates a conventional outlier, with both AB and BC abnormal and AC normal.
Code 6 is an edge outlier. Other codes are not necessarily outliers, e.g. codes
1 or 3 may be adjacent to a code 4. Use codeplot
to look at individual
curves, and zapvelout
to delete outliers.
diff(y, lag = lag) / diff(x, lag = lag) ^ velpower
Missing values for x or y are ignored. If any of the AB, BC or AC velocities
are abnormal (more than limit
SDs in absolute value from the median for
the dataset) the code for B is non-zero.
codeplot
, zapvelout
outliers <- velout(age, height, id, heights, limit=3)
Run the code above in your browser using DataLab