Compute mean and standard deviation of the correlation matrix
Source:R/anglemanise_utils.R
get_dstat.Rd
Computes the mean and standard deviation of the correlation matrix using the
big_apply
function.
Arguments
- corr_matrix
An
FBM
object.
Examples
s_mat <- Matrix::rsparsematrix(nrow = 10, ncol = 5, density = 0.3)
# Convert the sparse matrix to an FBM using your function
fbm_mat <- sparse_to_fbm(s_mat)
result <- get_dstat(fbm_mat)
str(result)
#> List of 6
#> $ mean: num -0.105
#> $ var : num 0.2
#> $ sd : num 0.447
#> $ sn : num -4.27
#> $ min : num -2.3
#> $ max : num 0.71
result
#> $mean
#> [1] -0.1046
#>
#> $var
#> [1] 0.1998092
#>
#> $sd
#> [1] 0.4470002
#>
#> $sn
#> [1] -4.273425
#>
#> $min
#> [1] -2.3
#>
#> $max
#> [1] 0.71
#>