Time warp a data-series using a time-offsetting model.

# Default S3 method
fit_align(
  x,
  y = NULL,
  by = NULL,
  fun = function(par, x) par[1] + (par[2] * x),
  lower = c(-60, 0.3),
  upper = c(60, 3),
  ...
)

Arguments

x

A first time-series vector or a data.frame containing time-series to use a reference when warp-fitting y.

y

A second time-series vector or a data.frame containing time-series to warp-fit with x.

by

If x or y are data.frames, the names of time-series to warp-fit.

fun

A function describing the warp-fitting model to be applied.

lower

The lowest values for fun, one per parameter.

upper

The highest values for fun, one per parameter.

...

Other arguments, typically applied by generic alignment methods or ignored.

Value

By default, fit_align returns x and y as an aligned data.frame. It also provides a lag correlation profile (plot) and alignment report. The extra function, output, can be used to modify this behavior (see also alignment).

Author

Karl Ropkins