tram: Compute the Tracking Aberration Measure (TrAM)

Description Usage Arguments Details Value Examples

Description

tram returns the Tracking Aberration Measure computed from multiple time series

Usage

1
2
tram(values, num.knots = floor(nrow(values)/5), p = 0.5,
  euclidian.list = list())

Arguments

values

A numeric matrix whose columns are simultaneous time series. Must have column names and at least 6 time points (rows). Values from different types of measurement will typically be rescaled so their typical fluctuations are comparable in scale (see median_abs_diff_rescale).

num.knots

A positive integer number of knots in the smoothing spline fits.

p

Positive exponent used to combine jumpiness across the time series. Values >1 tend to emphasize the single time series with the most jumpiness, whereas values <1 emphasize simultaneous jumps between multiple time series.

euclidian.list

A named list whose elements are character vectors. Each character vector specifies a group of column names whose deviations from smoothness will be combined in a Euclidian (exponent=2) manner prior to combining with other time series. This is useful for positional coordinates where spherical symmetry in the error is important to maintain.

Details

This function provides measures of discontinuities present across multiple simultaneous time series to enable detection of erroneous data that are "jumpy".

Value

Vector containing overall TrAM (named "tram") and component TrAM values prior to summing.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
scaled.cell.data <- median_abs_diff_rescale(cell.data, "cell",  "timepoint",
                                            c("x","y", "nuclear.roundness"))

trams <- do.call(rbind,by(scaled.cell.data, scaled.cell.data$cell,
                 function(scaled.cell.data) {
  values <- with(scaled.cell.data, cbind(x, y, nuclear.roundness))
  data.frame(cell=scaled.cell.data$cell[1],
             tram=tram(values, euclidian.list=list(xy=c("x", "y")))["tram"])
}))

## Not run: 

cammlab/TrAM documentation built on May 13, 2019, 11:02 a.m.