MyNixOS website logo
Description

Coincident Profile.

Builds the coincident profile proposed by Martinez, W and Nieto, Fabio H and Poncela, P (2016) <doi:10.1016/j.spl.2015.11.008>. This methodology studies the relationship between a couple of time series based on the the set of turning points of each time series. The coincident profile establishes if two time series are coincident, or one of them leads the second.

Coinprofile

This package allows us to calculate the turning points from the Bry and Boschan (1971) methodology. The main goal of Coinprofile is to build the coincident profile according to Martinez et al (2016).

Installation

You can install the released version of Coinprofile from CRAN with:

install.packages("Coinprofile")

Example

This is a basic example which shows you how to solve a common problem:

library(Coinprofile)
## basic example code
set.seed(123)
w <- seq(-3, 7, length.out = 100)
x1 <- sin(pi*w)+rnorm(100,0,0.1)
x2 <- sin(pi*w-0.1)+rnorm(100,0,0.1)
coincident_profile(x1, x2, 4, 5, "name.x", "name.y", TRUE, 1991, 2015, 4, 4)
#> $Profile
#>        p.value lags
#> p(-5)  0.78125   -5
#> p(-4)  0.78125   -4
#> p(-3)  0.78125   -3
#> p(-2)  0.78125   -2
#> p(-1)  1.56250   -1
#> p(0)  75.00000    0
#> p(1)  10.93750    1
#> p(2)   1.56250    2
#> p(3)   0.78125    3
#> p(4)   0.78125    4
#> p(5)   0.78125    5
#> 
#> $MainLag
#>   lag_MaxP-value name.x name.y Amount_TP_used
#> 1              0 name.x name.y              8

# In this example x leads y three periods
set.seed(123)
w <- seq(-3, 7, length.out = 100)
x <- sin(pi*w)+rnorm(100,0,0.1)
y <- sin(pi*w-1)+rnorm(100,0,0.1)
coincident_profile(x, y, 4, 6, "name.x", "name.y", TRUE, 1991, 2015, 4, 4)
#> $Profile
#>         p.value lags
#> p(-6)   0.78125   -6
#> p(-5)   0.78125   -5
#> p(-4)   1.56250   -4
#> p(-3) 100.00000   -3
#> p(-2)   0.78125   -2
#> p(-1)   0.78125   -1
#> p(0)    0.78125    0
#> p(1)    0.78125    1
#> p(2)    0.78125    2
#> p(3)    0.78125    3
#> p(4)    0.78125    4
#> p(5)    0.78125    5
#> p(6)    0.78125    6
#> 
#> $MainLag
#>   lag_MaxP-value name.x name.y Amount_TP_used
#> 1             -3 name.x name.y              8
Metadata

Version

0.1.9

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows