Skip to content

Commit

Permalink
Update helper_output_print.R
Browse files Browse the repository at this point in the history
Add R2 in input variable list, and conditional reminder if R2 is NA
  • Loading branch information
JihoonChoi26 authored Jul 24, 2024
1 parent 140b7c5 commit adcaaa2
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions R/helper_output_print.R
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ output_print <- function(n_covariates,
itcv,
alpha,
index,
far_bound) {
far_bound,
R2) {
if (index == "RIR"){
cat(crayon::bold("Robustness of Inference to Replacement (RIR):\n"))
if ((abs(est_eff) > abs(beta_threshhold)) & is.na(eff_thr) == TRUE) {
Expand Down Expand Up @@ -213,11 +214,13 @@ output_print <- function(n_covariates,
}
cat("\n")

# cat("For calculation of unconditional ITCV, request raw output. For unconditional ITCV")
# cat("\n")
# cat("using pkonfound(), additionally include the R2, sdx, and sdy as input.")
# cat("\n")
# cat("\n")
if (is.na(R2)) {
cat("For calculation of unconditional ITCV, request raw output. For unconditional ITCV")
cat("\n")
cat("using pkonfound(), additionally include the R2, sdx, and sdy as input.")
cat("\n")
cat("\n")
}

if (n_covariates == 0) {
cat("Note that sdx and sdy and R2 are only used to calculate the unconditional ITCV when")
Expand All @@ -226,6 +229,7 @@ output_print <- function(n_covariates,
cat("\n")
cat("\n")
}

cat("See Frank (2000) for a description of the method.")
cat("\n")
cat("\n")
Expand Down

0 comments on commit adcaaa2

Please sign in to comment.