Construct an openEBGM object
ebScores
calculates EBGM scores as well as the quantiles from the
posterior distribution and returns an object of class openEBGM.
ebScores(processed, hyper_estimate, quantiles = c(5, 95), digits = 2)
processed |
A data frame resulting from running |
hyper_estimate |
A list resulting from running |
quantiles |
Either a numeric vector of desired quantiles to be calculated from the posterior distribution or NULL for no calculation of quantiles. |
digits |
A whole number scalar specifying how many decimal places to use for rounding EBGM and the quantiles scores. |
This function takes the processed data as well as the hyperparameter estimates and instantiates an object of class openEBGM. This object then contains additional calculations, such as the EBGM score, and the quantiles that are supplied by the quantiles parameter at the time of calling the function.
The function allows for the choice of an arbitrary amount of quantiles or no quantiles at all to be calculated. This may be helpful for large datasets, or when the EBGM score is the only metric of interest.
An openEBGM object (class S3) containing:
data: A data frame containing the results (scores, etc.).
hyper_parameters: A list containing the hyperparameter estimation results.
quantiles: The chosen percentiles.
theta_init <- data.frame(alpha1 = c(0.2, 0.1), beta1 = c(0.1, 0.1), alpha2 = c(2, 10), beta2 = c(4, 10), p = c(1/3, 0.2) ) data(caers) proc <- processRaw(caers) squashed <- squashData(proc, bin_size = 100, keep_pts = 100) squashed <- squashData(squashed, count = 2, bin_size = 10, keep_pts = 20) suppressWarnings( hypers <- autoHyper(data = squashed, theta_init = theta_init) ) obj <- ebScores(processed = proc, hyper_estimate = hypers, quantiles = c(10, 90))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.