Skip to content

Commit

Permalink
remove commented out codes
Browse files Browse the repository at this point in the history
  • Loading branch information
Naeemkh committed Mar 11, 2024
1 parent b597afb commit cfbb343
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 48 deletions.
13 changes: 0 additions & 13 deletions R/check_covar_balance.R
Original file line number Diff line number Diff line change
Expand Up @@ -93,23 +93,10 @@ check_covar_balance <- function(w,
covar_bl_trs = 0.1,
covar_bl_trs_type = "mean"){

# Passing packaging check() ----------------------------
# covar_bl_method <- NULL
# covar_bl_trs <- NULL
# covar_bl_trs_type <- NULL
# ------------------------------------------------------

logger::log_debug("Started checking covariate balance ... ")
s_ccb_t <- proc.time()

# collect additional arguments
# dot_args <- list(...)
# arg_names <- names(dot_args)
#
# for (i in arg_names){
# assign(i,unlist(dot_args[i], use.names = FALSE))
# }

post_process_abs <- function(abs_cor) {

covar_bl_t <- paste0(covar_bl_trs_type, "_absolute_corr")
Expand Down
5 changes: 1 addition & 4 deletions R/check_kolmogorov_smirnov.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,7 @@ check_kolmogorov_smirnov <- function(w,

logger::log_debug("Started checking Kolmogorov-Smirnov (KS) statistics ... ")
s_ks_t <- proc.time()
#
# data.table::setDF(w)
# data.table::setDF(c)
# data.table::setDF(counter_weight)

tmp_data <- cbind(w, c)

if (!(ci_appr %in% c("matching", "weighting"))) {
Expand Down
2 changes: 0 additions & 2 deletions R/compile_pseudo_pop.R
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,6 @@ compile_pseudo_pop <- function(data_obj,

dist_measure <- delta_n <- bin_seq <- NULL

# Checking arguments
# check_args_compile_pseudo_pop(ci_appr = ci_appr, ...)

if (!(is.object(data_obj) && !isS4(data_obj))) {
stop("data_obj should be a S3 object.")
Expand Down
7 changes: 0 additions & 7 deletions R/create_matching.R
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,6 @@ create_matching <- function(.data,

# ------------------------------------------------------

# dot_args <- list(...)
# arg_names <- names(dot_args)
#
# for (i in arg_names) {
# assign(i, unlist(dot_args[i], use.names = FALSE))
# }

gps_mx <- compute_min_max(.data[["gps"]])
w_mx <- compute_min_max(.data[[exposure_col_name]])

Expand Down
9 changes: 0 additions & 9 deletions R/estimate_npmetric_erf.R
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,6 @@ estimate_npmetric_erf<-function(m_Y,
x_eval = NULL,
kernel_appr = kernel_appr)

# risk_val_1 <- lapply(bw_seq,
# compute_risk,
# matched_Y = m_Y,
# matched_w = m_w,
# matched_cw = counter_weight,
# w_vals = w_vals,
# x_eval = NULL,
# kernel_appr = kernel_appr)

parallel::stopCluster(cl)

risk_val <- do.call(rbind, risk_val_1)[, 1]
Expand Down
11 changes: 0 additions & 11 deletions R/generate_pseudo_pop.R
Original file line number Diff line number Diff line change
Expand Up @@ -149,17 +149,6 @@ generate_pseudo_pop <- function(.data,
class(result) <- "cgps_pspop"

result$params$ci_appr <- cw_obj$params$ci_appr
#result$params$params <- params
# for (item in arg_names){
# result$params[[item]] <- get(item)
# }


# if (include_original_data){
# result$original_data <- original_data
# }

# result$original_data_size <- nrow(original_data)

result$.data <- merged_data
result$params$adjusted_corr_results <- adjusted_corr_obj$corr_results
Expand Down
2 changes: 0 additions & 2 deletions R/matching_fn.R
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ matching_fn <- function(w,
stop("w should be a vector of size 1.")
}

#dataset$w <- dataset[[exposure_col_name]]

logger::log_debug("Started matching on single w value (w = {w}) ...")
st_ml_t <- proc.time()

Expand Down

0 comments on commit cfbb343

Please sign in to comment.