Learn R Programming

wasim (version 1.1.2)

diff_diff: Count time steps with wrong direction in dynamics

Description

diff_diff counts the time steps for two time series during which the first shows an increase and the second shows a decrease.

Usage

diff_diff(x, y)

Arguments

x
Modelled time series or array with dimension c(number_series, dim(y))
y
Measured time series

Value

The count

Examples

Run this code
   data(models_dawson,package="wasim")
   diff_diff(models_dawson[,1],models_dawson[,2])

   do.call(rbind,lapply(models_dawson, FUN =diff_diff, y=models_dawson[,1]))

Run the code above in your browser using DataLab