summary_list_q {meshed} | R Documentation |
Quantiles of elements of matrices in a list
Description
For a list of matrices \{ X^{(1)}, \dots, X^{(L)} \}
, all of the same dimension, this function computes the matrix \hat{X}
with i,j
entry \hat{X}_{i,j} =
quantile(
\{ X_{ i,j }^{(l)} \}_{l=1}^L
, q)
. This function does not run any check on the dimensions and uses OpenMP if available. This is only a convenience function that is supposed to speed up quantile computation for very large problems. The results may be slightly different from R's quantile
which should be used for small problems.
Usage
summary_list_q(x, q, n_threads=1)
Arguments
x |
A list of matrices of the same dimension. |
q |
A number between 0 and 1. |
n_threads |
integer number of OpenMP threads. This is ineffective if |
Value
The matrix of quantiles.
Author(s)
Michele Peruzzi michele.peruzzi@duke.edu
Examples
# make some data into a list
set.seed(2021)
L <- 200
x <- lapply(1:L, function(i) matrix(runif(300), ncol=3))
quant_done1 <- summary_list_q(x, .9)
[Package meshed version 0.2.3 Index]