Calculate the maximum possible number of recurrent points in a recurrence matrix.
Arguments
- RM
A Matrix object
- dims
Two element vector representing the dimensions of Matrix
RM
. Ifdims
is provided, the Matrix does not have to be passed as an argument (default =NA
)- AUTO
Is the Matrix an Auto Recurrence Matrix? If so, the length of the diagonal will be subtracted from the matrix size, pass
FALSE
to prevent this behaviour. IfNULL
(default)AUTO
will take on the value ofisSymmetric(RM)
.- theiler
Should a Theiler window be applied?
Details
This function can take into account the presence of a theiler
window, that is the points in the window will be excluded from the calculation. For example, some scholars will exclude the main diagonal from the calculation of the recurrence rate.
See also
Other Distance matrix operations (recurrence plot):
bandReplace()
,
createCorridor()
,
mat_di2bi()
,
mat_di2ch()
,
mat_di2we()
,
mat_hamming()
,
rp()
,
rp_lineDist()
,
rp_nzdiags()
,
rp_plot()
Examples
# Create a 10 by 10 matrix
library(Matrix)
m <- Matrix(rnorm(10),10,10)
rp_size(RM = m, AUTO = TRUE, theiler = 0) # Subtract diagonal
#> $rp_size_total
#> [1] 100
#>
#> $rp_size_theiler
#> [1] 100
#>
rp_size(RM = m, AUTO = FALSE,theiler = 0) # Do not subtract diagonal
#> $rp_size_total
#> [1] 100
#>
#> $rp_size_theiler
#> [1] 100
#>
rp_size(RM = m, AUTO = NULL, theiler = 0) # Matrix is symmetrical, AUTO is set to TRUE
#> $rp_size_total
#> [1] 100
#>
#> $rp_size_theiler
#> [1] 100
#>
rp_size(RM = m, AUTO = NULL, theiler = 1) # Subtract a Theiler window of 1 around and including the diagonal
#> $rp_size_total
#> [1] 100
#>
#> $rp_size_theiler
#> [1] 90
#>
# Calculate without a matrix
rp_size(dims = c(10,10), AUTO = TRUE, TRUE,0)
#> $rp_size_total
#> [1] 100
#>
#> $rp_size_theiler
#> [1] 100
#>
rp_size(dims = c(10,10), AUTO = FALSE,FALSE,0)
#> $rp_size_total
#> [1] 100
#>
#> $rp_size_theiler
#> [1] 100
#>