aggregate_pf | R Documentation |
Function to aggregate the set of performance matrices, by criterion, using sample statistics of the sampling distribution across K. Resulting object is of class 'aggregate_pf'
.
aggregate_pf(pf, custom = NULL)
pf |
|
custom |
|
The base statistics provided in the output are as follows:
(mean)
; mean
(sd)
; standard deviation
(q0)
; minimum (0% quantile)
(q2.5)
; 2.5% quantile
(q25)
; 25% quantile
(median)
; median (50% quantile)
(q75)
; 75% quantile
(q97.5)
; 97.5% quantile
(q100)
; maximum (100% quantile)
(iqr)
; IQR (75% quantile - 25% quantile)
(skewness)
; skewness
(dip)
; p-value of dip test for unimodality (see ?dip
for details)
Users can define and pass-in their own custom statistics used for the aggregation of the performance metrics, but must adhere to the following rules:
Inputs are limited to *ONLY* single numeric vectors
Outputs must be a single numeric value
# User-defined functions to calculate a custom aggregation statistic (see Details for rules)
my_stat1 <- function(x){
val <- sum(x)/length(x) + 34
return(val) # return value must be a single numeric element
}
my_metric2 <- function(x){
val <- (sum(x)-min(x))/6
return(val) # return value must be a single numeric element
}
# Implementing in aggregate()
aggregate(pf = pf, custom = c("my_stat1", "my_stat2"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.