Skip to content

Commit

Permalink
Visualization of test stats
Browse files Browse the repository at this point in the history
  • Loading branch information
franzmohr committed Jul 7, 2023
1 parent 64ee546 commit ccce3e6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
9 changes: 8 additions & 1 deletion R/plot.ctryvartest.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,16 @@ plot.ctryvartest <- function(x, ctry = NULL, ...) {

for (i in pos) {
ctry_name <- names(x)[i]
ctry_temp <- lapply(x[[i]][[2]], colSums)
ctry_temp <- c()
x_names <- c()
for (j in 1:nrow(x[[i]][["teststats"]])) {

if (is.na(x[[i]][["teststats"]][j, "LL"])) {
next
}

ctry_temp[[j]] <- colSums(x[[i]][[2]][[j]])

temp <- c()
if ("p_domestic" %in% names(x[[i]][["teststats"]])) {
temp <- append(temp, paste0("p = ", x[[i]][["teststats"]][j, "p_domestic"]))
Expand Down
1 change: 1 addition & 0 deletions R/submodel_test_statistics.R
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ submodel_test_statistics <- function(object, ...){
# Skip tests if posterior simulation was not successful
if (!is.null(object[[i]][["error"]])) {
if (object[[i]][["error"]]) {
loglik[[i]] <- NA
next
}
}
Expand Down

0 comments on commit ccce3e6

Please sign in to comment.