Description Usage Arguments Value Examples
Compute the information flow from lsrc time series src to
another ldst time series dst. Optionally, the user can specify
lback background time series back to conditioning probabilities.
1 |
src |
Vector or matrix specifying one or more source time series. |
dst |
Vector or matrix specifying one or more destination time series. |
back |
Vector or matrix specifying one or more background time series. |
lsrc |
Integer giving the number of sources. |
ldst |
Integer giving the number of destinations. |
lback |
Integer giving the number of backgrounds. |
Numeric giving the value of information flow.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | # Information flow across four time series:
ws <- c(0, 0, 1, 0, 1, 1, 0, 1)
xs <- c(0, 0, 1, 0, 1, 1, 0, 1)
ys <- c(0, 0, 1, 0, 1, 1, 0, 1)
zs <- c(0, 0, 0, 0, 0, 0, 0, 0)
info_flow(src = xs, dst = ys, lsrc = 1, ldst = 1) # flow ~ 1.0
info_flow(src = xs, dst = ys, back = ws, lsrc = 1, ldst = 1, lback = 1) # flow ~ 0.0
info_flow(src = ws, dst = zs, back = ys, lsrc = 1, ldst = 1, lback = 1) # flow ~ 0.0
# Now let's intervene on ys and zs
ws <- c(0, 0, 1, 0, 1, 1, 0, 1)
xs <- c(0, 0, 1, 0, 1, 1, 0, 1)
ys <- c(1, 0, 1, 0, 0, 1, 1, 0)
zs <- c(1, 0, 0, 0, 1, 0, 1, 1)
info_flow(src = xs, dst = ys, lsrc = 1, ldst = 1) # flow ~ 0.0
info_flow(src = xs, dst = ys, back = ws, lsrc = 1, ldst = 1, lback = 1) # flow ~ 0.0
info_flow(src = ws, dst = zs, back = ys, lsrc = 1, ldst = 1, lback = 1) # flow ~ 1.0
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.