Skip to content

Commit

Permalink
fixed nsec calculations
Browse files Browse the repository at this point in the history
  • Loading branch information
dbarneche committed Sep 1, 2021
1 parent 895d4a2 commit 0a9d307
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion R/nsec.R
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,14 @@ nsec.default <- function(object, sig_val = 0.01, precision = 1000,
probs = sig_val)
}
}
nsec_out <- apply(p_samples, 1, nsec_fct, reference, x_vec)
nsec_out <- apply(p_samples, 1, nsec_fct, reference, x_vec)
formula <- object$bayesnecformula
x_str <- grep("crf(", labels(terms(formula)), fixed = TRUE, value = TRUE)
x_call <- str2lang(eval(parse(text = x_str)))
if (inherits(x_call, "call")) {
x_call[[2]] <- str2lang("nsec_out")
nsec_out <- eval(x_call)
}
if (inherits(xform, "function")) {
nsec_out <- xform(nsec_out)
}
Expand Down

0 comments on commit 0a9d307

Please sign in to comment.