Skip to content

Commit

Permalink
update robustness_index function
Browse files Browse the repository at this point in the history
  • Loading branch information
LoukiaSpin committed Aug 7, 2024
1 parent c474cbd commit 4094692
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions R/robustness.index_function.R
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,9 @@ robustness_index <- function(sens, threshold) {
} else {
measure <- sens$measure
es_mat <- if (is.element(measure, c("RR", "RD"))) {
sens$EM_LOR
as.matrix(sens$EM_LOR)
} else {
sens$EM
as.matrix(sens$EM)
}
scenarios <- sens$scenarios
#n_scenar <- length(scenarios)^2
Expand Down Expand Up @@ -201,9 +201,15 @@ robustness_index <- function(sens, threshold) {

# A matrix of estimates for all possible comparisons under each scenario
mean_mat <-
matrix(es_mat[, 1], nrow = n_scenar, ncol = length(es_mat[, 1])/2, byrow = TRUE)
matrix(es_mat[, 1],
nrow = n_scenar,
ncol = length(es_mat[, 1])/n_scenar,
byrow = TRUE)
sd_mat <-
matrix(es_mat[, 2], nrow = n_scenar, ncol = length(es_mat[, 1])/2, byrow = TRUE)
matrix(es_mat[, 2],
nrow = n_scenar,
ncol = length(es_mat[, 1])/n_scenar,
byrow = TRUE)
#mean_mat <- matrix(rep(NA, length(es_mat[, 1])), nrow = n_scenar)
#sd_mat <- mean_mat
#for (i in 1:n_scenar) {
Expand Down

0 comments on commit 4094692

Please sign in to comment.