velout(x, y, id, data, lag = 1, velpower = 0.5, limit = 5, linearise = FALSE)codeplot to look at individual curves, and zapvelout to delete
outliers. | code | AB+BC | AC |
| interpretation | 0 | 0 |
| 0 | no outlier | 0 |
| 0 | NA | no outlier |
| 1 | 0 | 1 |
| rare pattern | 2 | 1 |
| 0 | complicated - look at curve | 3 |
| 1 | 1 | adjacent to simple outlier |
| 4 | 2 | 0 |
| single outlier | 5 | 2 |
| 1 | double outlier | 6 |
| 1 | NA | edge outlier |
| 7 | - | - |
| first duplicate age | code | AB+BC |
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