diff --git a/DESCRIPTION b/DESCRIPTION index 4bf5e4c0..b5125cda 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,11 +1,12 @@ -Type: Package +Title: Matching Adjusted Indirect Comparison Package: maicplus -Title: R Package Template Version: 0.1.0 Date: 2023-03-03 Authors@R: person("hta-pharma", , , "hta-pharma@example.com", role = c("aut", "cre")) -Description: R package template with GitHub Actions workflows included. +Description: The maicplus package facilitates performing matching adjusted indirect comparison + (MAIC) analysis where the endpoint of interest is either time-to-event + (e.g. overall survival) or binary (e.g. objective tumor response). License: Apache License 2.0 URL: https://github.com/hta-pharma/maicplus/ BugReports: https://github.com/hta-pharma/maicplus/issues @@ -16,10 +17,12 @@ Imports: stats, survival, DescTools, - MASS + MASS, + boot Suggests: knitr, - testthat (>= 2.0) + testthat (>= 2.0), + ggplot2 VignetteBuilder: knitr biocViews: diff --git a/NAMESPACE b/NAMESPACE index 3dcacc76..23412536 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -15,15 +15,8 @@ export(process_agd) export(resid_plot) export(survfit_makeup) import(DescTools) +import(MASS) +import(boot) +import(graphics) import(stats) -importFrom(graphics,abline) -importFrom(graphics,axis) -importFrom(graphics,hist) -importFrom(graphics,legend) -importFrom(graphics,lines) -importFrom(graphics,par) -importFrom(graphics,points) -importFrom(survival,Surv) -importFrom(survival,cox.zph) -importFrom(survival,coxph) -importFrom(survival,survfit) +import(survival) diff --git a/R/bucher.R b/R/bucher.R index 79388cca..def049f2 100644 --- a/R/bucher.R +++ b/R/bucher.R @@ -24,9 +24,10 @@ #' \item{pval}{p-value of Z-test, with null hypothesis that \code{est} is zero} #' } #' @export -#' @import stats -#' #' @examples +#' trt <- list(est = 1.1, se = 0.2) +#' com <- list(est = 1.3, se = 0.18) +#' bucher(trt, com, conf_lv = 0.9) bucher <- function(trt, com, conf_lv = 0.95) { est <- trt$est - com$est se <- sqrt(trt$se^2 + com$se^2) diff --git a/R/maic_unanchored_tte.R b/R/maic_unanchored_tte.R index 86583ff1..8d7e0bdc 100644 --- a/R/maic_unanchored_tte.R +++ b/R/maic_unanchored_tte.R @@ -16,12 +16,9 @@ #' \item time - numeric column, observation time of the \code{status}; unit in days #' } #' -#' @return -#' @importFrom survival Surv survfit coxph cox.zph -#' @importFrom graphics par axis lines points legend abline +#' @return A list of KM plot, analysis table, and diagnostic plot #' @export -#' -#' @examples + maic_tte_unanchor <- function(useWt, dat, dat_ext, trt, trt_ext, time_scale = "month", endpoint_name = "OS", transform = "log") { @@ -53,7 +50,7 @@ maic_tte_unanchor <- function(useWt, dat, dat_ext, trt, trt_ext, kmobj_adj <- survfit(Surv(time, status) ~ treatment, dat, weights = dat$weight, conf.type = "log-log") par(cex.main = 0.85) - km_makeup(kmobj, kmobj_adj, + km_plot(kmobj, kmobj_adj, time_scale = time_scale, trt = trt, trt_ext = trt_ext, endpoint_name = endpoint_name diff --git a/R/maicplus-package.R b/R/maicplus-package.R new file mode 100644 index 00000000..900cae40 --- /dev/null +++ b/R/maicplus-package.R @@ -0,0 +1,16 @@ +#' @keywords internal +"_PACKAGE" + +# The following block is used by usethis to automatically manage +# roxygen namespace tags. Modify with care! +## usethis namespace: start +## usethis namespace: end +NULL + +#' @import graphics +#' @import stats +#' @import survival +#' @import DescTools +#' @import MASS +#' @import boot +NULL diff --git a/R/matching.R b/R/matching.R index 582a9818..aeb64447 100644 --- a/R/matching.R +++ b/R/matching.R @@ -1,12 +1,10 @@ # Functions for matching step: estimation of individual weights -# functions to be exported --------------------------------------- - #' Derive individual weights in the matching step of MAIC #' -#' Assuming data is properly processed, this function takes individual patient data (IPD) with centered covariates -#' (effect modifiers and/or prognostic variables) as input, and generates weights for each individual in IPD trial that -#' matches the chosen statistics of those covariates in Aggregated Data (AgD) trial. +#' This function takes individual patient data (IPD) with centered covariates +#' (effect modifiers and/or prognostic variables) as input and generates +#' weights for each individual in IPD trial to match the covariates in aggregate data. #' #' @param data a numeric matrix, centered covariates of IPD, no missing value in any cell is allowed #' @param centered_colnames a character or numeric vector (column indicators) of centered covariates @@ -27,8 +25,7 @@ #' \item{opt}{R object returned by \code{base::optim()}, for assess convergence and other details} #' } #' @export -#' -#' @examples + estimate_weights <- function(data, centered_colnames = NULL, start_val = 0, method = "BFGS", ...) { # pre check ch1 <- is.data.frame(data) @@ -116,7 +113,7 @@ estimate_weights <- function(data, centered_colnames = NULL, start_val = 0, meth #' @param main_title a character string, main title of the plot #' #' @return a plot of unscaled or scaled weights -#' @importFrom graphics hist +#' @examples #' @export plot_weights <- function(wt, bin_col = "#6ECEB2", vline_col = "#688CE8", main_title = "Unscaled Individual Weights") { @@ -155,13 +152,13 @@ plot_weights <- function(wt, bin_col = "#6ECEB2", vline_col = "#688CE8", main_ti #' This function checks to see if the optimization is done properly by checking the covariate averages #' before and after adjustment. #' -#' @param optimized object returned after calculating weights using \code{\link{estimate_weights}} +#' @param weighted_data object returned after calculating weights using \code{\link{estimate_weights}} #' @param processed_agd a data frame, object returned after using \code{\link{process_agd}} or #' aggregated data following the same naming convention #' #' @import DescTools #' -#' @return data.frame of weighted and unweighted covariate averages of the IPD +#' @return data.frame of weighted and unweighted covariate averages of the IPD, and average of aggregate data #' @export #' #' @examples @@ -209,14 +206,15 @@ plot_weights <- function(wt, bin_col = "#6ECEB2", vline_col = "#688CE8", main_ti #' ) #' #' check <- check_weights( -#' optimized = match_res, +#' weighted_data = match_res, #' processed_agd = target_pop #' ) #' #' print(check) -check_weights <- function(optimized, processed_agd) { - ipd_with_weights <- optimized$data - match_cov <- optimized$centered_colnames +#' +check_weights <- function(weighted_data, processed_agd) { + ipd_with_weights <- weighted_data$data + match_cov <- weighted_data$centered_colnames # if algorithm is correct, all centered columns should have a weighted summation to a very small number around zero num_check <- ipd_with_weights$weights %*% as.matrix(ipd_with_weights[, match_cov, drop = FALSE]) diff --git a/R/process_data.R b/R/process_data.R index 57db8ff3..96df5d1d 100644 --- a/R/process_data.R +++ b/R/process_data.R @@ -18,7 +18,6 @@ #' by legal suffixes (i.e. MEAN, MEDIAN, SD, COUNT, or PROP). #' #' @examples -#' # example #' target_pop <- read.csv(system.file("extdata", "aggregate_data_example_1.csv", #' package = "maicplus", mustWork = TRUE #' )) @@ -33,20 +32,6 @@ #' target_pop2 <- process_agd(target_pop2) #' target_pop3 <- process_agd(target_pop3) #' -#' # another example -#' target_pop <- data.frame( -#' STUDY = "Study_XXXX", -#' ARM = "Total", -#' N = 300, -#' AGE_MEAN = 51, -#' AGE_MEDIAN = 49, -#' AGE_SD = 3.25, -#' SEX_MALE_COUNT = 147, -#' ECOG0_COUNT = 105, -#' SMOKE_PROP = 58 / 290 -#' ) -#' process_agd(target_pop) -#' #' @return pre-processed aggregate level data #' @export @@ -155,7 +140,7 @@ dummize_ipd <- function(raw_ipd, dummize_cols, dummize_ref_level) { #' #' @param ipd IPD variable names should match the aggregate data names without the suffix. #' This would involve either changing the aggregate data name or the ipd name. -#' For instance, if we binarize SEX variable with MALE as a reference, function names the new variable as SEX_MALE. +#' For instance, if we binarize SEX variable with MALE as a reference using [dummize_ipd], function names the new variable as SEX_MALE. #' In this case, SEX_MALE should also be available in the aggregate data. #' @param agd pre-processed aggregate data which contain STUDY, ARM, and N. Variable names should be followed #' by legal suffixes (i.e. MEAN, MEDIAN, SD, or PROP). Note that COUNT suffix is no longer accepted. @@ -247,13 +232,14 @@ complete_agd <- function(use_agd) { } -#' helper function: transform TTE ADaM data to suitable input for survival R pkg +#' helper function: transform TTE ADaM data to suitable input for survival R package #' #' @param dd data frame, ADTTE read via haven::read_sas #' @param time_scale a character string, 'year', 'month', 'week' or 'day', time unit of median survival time #' @param trt values to include in treatment column #' #' @return a data frame that can be used as input to survival::Surv + ext_tte_transfer <- function(dd, time_scale = "month", trt = NULL) { time_units <- list("year" = 365.24, "month" = 30.4367, "week" = 7, "day" = 1) diff --git a/R/survival-helper.R b/R/survival-helper.R index 8f22818d..b9b3dd03 100644 --- a/R/survival-helper.R +++ b/R/survival-helper.R @@ -1,6 +1,6 @@ #' helper function: makeup to get median survival time from a `survival::survfit` object #' -#' extract and display median survival time with confidence interval +#' Extract and display median survival time with confidence interval #' #' @param km_fit returned object from \code{survival::survfit} #' @param legend a character string, name used in 'type' column in returned data frame @@ -9,13 +9,13 @@ #' @return a data frame with a index column 'type', median survival time and confidence interval #' @export medSurv_makeup <- function(km_fit, legend = "before matching", time_scale) { - timeUnit <- list("year" = 365.24, "month" = 30.4367, "week" = 7, "day" = 1) + time_unit <- list("year" = 365.24, "month" = 30.4367, "week" = 7, "day" = 1) - if (!time_scale %in% names(timeUnit)) stop("time_scale has to be 'year', 'month', 'week' or 'day'") + if (!time_scale %in% names(time_unit)) stop("time_scale has to be 'year', 'month', 'week' or 'day'") # km_fit is the returned object from survival::survfit km_fit <- summary(km_fit)$table - km_fit[, 5:ncol(km_fit)] <- km_fit[, 5:ncol(km_fit)] / timeUnit[[time_scale]] + km_fit[, 5:ncol(km_fit)] <- km_fit[, 5:ncol(km_fit)] / time_unit[[time_scale]] toyadd <- data.frame( treatment = gsub("treatment=", "", rownames(km_fit)), @@ -30,13 +30,12 @@ medSurv_makeup <- function(km_fit, legend = "before matching", time_scale) { -#' helper function: makeup `survival::survfit` object for km plot +#' Helper function to select a set of variables used for Kaplan-Meier plot #' #' @param km_fit returned object from \code{survival::survfit} -#' +#' @return a list of data frames of variables from \code{survival::survfit}. Data frames are divided by treatment. #' @export -#' -#' @return a list of data frames, one element per treatment + survfit_makeup <- function(km_fit) { kmdat <- data.frame( time = km_fit$time, @@ -60,14 +59,15 @@ survfit_makeup <- function(km_fit) { #' @param km_fit_after returned object from \code{survival::survfit} after adjustment #' @param time_scale a character string, 'year', 'month', 'week' or 'day', time unit of median survival time #' @param trt a character string, name of the interested treatment in internal trial (real IPD) -#' @param trt_ext character string, name of the interested comparator in external trial used to subset \code{dat_ext} (pseudo IPD) +#' @param trt_ext character string, name of the interested comparator in external trial used to +#' subset \code{dat_ext} (pseudo IPD) #' @param endpoint_name a character string, name of the endpoint #' #' @return a KM plot -km_makeup <- function(km_fit_before, km_fit_after = NULL, time_scale, trt, trt_ext, endpoint_name = "") { - timeUnit <- list("year" = 365.24, "month" = 30.4367, "week" = 7, "day" = 1) +km_plot <- function(km_fit_before, km_fit_after = NULL, time_scale, trt, trt_ext, endpoint_name = "") { + time_unit <- list("year" = 365.24, "month" = 30.4367, "week" = 7, "day" = 1) - if (!time_scale %in% names(timeUnit)) stop("time_scale has to be 'year', 'month', 'week' or 'day'") + if (!time_scale %in% names(time_unit)) stop("time_scale has to be 'year', 'month', 'week' or 'day'") # prepare data for plot pd_be <- survfit_makeup(km_fit_before) @@ -79,12 +79,12 @@ km_makeup <- function(km_fit_before, km_fit_after = NULL, time_scale, trt, trt_e } else { max_t <- max(km_fit_before$time) } - t_range <- c(0, (max_t / timeUnit[[time_scale]]) * 1.07) + t_range <- c(0, (max_t / time_unit[[time_scale]]) * 1.07) # base plot par(mfrow = c(1, 1), bty = "n", tcl = -0.15, mgp = c(2.3, 0.5, 0)) plot(0, 0, - type = "n", xlab = paste0("Time in", time_scale), ylab = "Survival Probability", + type = "n", xlab = paste0("Time in ", time_scale), ylab = "Survival Probability", ylim = c(0, 1), xlim = t_range, yaxt = "n", main = paste0( "Kaplan-Meier Curves of Comparator ", ifelse(!is.null(km_fit_after), "(AgD) ", ""), @@ -94,29 +94,29 @@ km_makeup <- function(km_fit_before, km_fit_after = NULL, time_scale, trt, trt_e ) axis(2, las = 1) - # add km lines from external trail + # add km lines from external trial lines( y = pd_be[[trt_ext]]$surv, - x = (pd_be[[trt_ext]]$time / timeUnit[[time_scale]]), col = "#5450E4", + x = (pd_be[[trt_ext]]$time / time_unit[[time_scale]]), col = "#5450E4", type = "s" ) tmpid <- pd_be[[trt_ext]]$censor == 1 points( y = pd_be[[trt_ext]]$surv[tmpid], - x = (pd_be[[trt_ext]]$time[tmpid] / timeUnit[[time_scale]]), + x = (pd_be[[trt_ext]]$time[tmpid] / time_unit[[time_scale]]), col = "#5450E4", pch = 3, cex = 0.7 ) # add km lines from internal trial before adjustment lines( y = pd_be[[trt]]$surv, - x = (pd_be[[trt]]$time / timeUnit[[time_scale]]), col = "#00857C", + x = (pd_be[[trt]]$time / time_unit[[time_scale]]), col = "#00857C", type = "s" ) tmpid <- pd_be[[trt]]$censor == 1 points( y = pd_be[[trt]]$surv[tmpid], - x = (pd_be[[trt]]$time[tmpid] / timeUnit[[time_scale]]), + x = (pd_be[[trt]]$time[tmpid] / time_unit[[time_scale]]), col = "#00857C", pch = 3, cex = 0.7 ) @@ -124,13 +124,13 @@ km_makeup <- function(km_fit_before, km_fit_after = NULL, time_scale, trt, trt_e if (!is.null(km_fit_after)) { lines( y = pd_af[[trt]]$surv, - x = (pd_af[[trt]]$time / timeUnit[[time_scale]]), col = "#6ECEB2", lty = 2, + x = (pd_af[[trt]]$time / time_unit[[time_scale]]), col = "#6ECEB2", lty = 2, type = "s" ) tmpid <- pd_af[[trt]]$censor == 1 points( y = pd_af[[trt]]$surv[tmpid], - x = (pd_af[[trt]]$time[tmpid] / timeUnit[[time_scale]]), + x = (pd_af[[trt]]$time[tmpid] / time_unit[[time_scale]]), col = "#6ECEB2", pch = 3, cex = 0.7 ) } @@ -142,7 +142,7 @@ km_makeup <- function(km_fit_before, km_fit_after = NULL, time_scale, trt, trt_e legend = c( paste0("Comparator: ", trt_ext), paste0("Treatment: ", trt), - paste0("Treatment: ", trt, "(with weights)") + paste0("Treatment: ", trt, " (with weights)") )[use_leg] ) } @@ -161,15 +161,20 @@ km_makeup <- function(km_fit_before, km_fit_after = NULL, time_scale, trt, trt_e #' #' @return a plot #' @export -log_cum_haz_plot <- function(clldat, time_scale, log_time = TRUE, endpoint_name = "", subtitle = "", exclude_censor = TRUE) { - timeUnit <- list("year" = 365.24, "month" = 30.4367, "week" = 7, "day" = 1) - if (!time_scale %in% names(timeUnit)) stop("time_scale has to be 'year', 'month', 'week' or 'day'") +log_cum_haz_plot <- function(clldat, + time_scale, + log_time = TRUE, + endpoint_name = "", + subtitle = "", + exclude_censor = TRUE) { + time_unit <- list("year" = 365.24, "month" = 30.4367, "week" = 7, "day" = 1) + if (!time_scale %in% names(time_unit)) stop("time_scale has to be 'year', 'month', 'week' or 'day'") if (exclude_censor) { clldat <- lapply(clldat, function(xxt) xxt[xxt$censor == 0, , drop = FALSE]) } - all.times <- do.call(rbind, clldat)$time / timeUnit[[time_scale]] + all.times <- do.call(rbind, clldat)$time / time_unit[[time_scale]] if (log_time) all.times <- log(all.times) t_range <- range(all.times) y_range <- range(log(do.call(rbind, clldat)$cumhaz)) @@ -190,7 +195,7 @@ log_cum_haz_plot <- function(clldat, time_scale, log_time = TRUE, endpoint_name cols <- c("dodgerblue3", "firebrick3") pchs <- c(1, 4) for (i in seq_along(clldat)) { - use_x <- (clldat[[i]]$time / timeUnit[[time_scale]]) + use_x <- (clldat[[i]]$time / time_unit[[time_scale]]) if (log_time) use_x <- log(use_x) lines( @@ -222,18 +227,18 @@ log_cum_haz_plot <- function(clldat, time_scale, log_time = TRUE, endpoint_name #' @export resid_plot <- function(coxobj, time_scale = "month", log_time = TRUE, endpoint_name = "", subtitle = "") { - timeUnit <- list("year" = 365.24, "month" = 30.4367, "week" = 7, "day" = 1) - if (!time_scale %in% names(timeUnit)) stop("time_scale has to be 'year', 'month', 'week' or 'day'") + time_unit <- list("year" = 365.24, "month" = 30.4367, "week" = 7, "day" = 1) + if (!time_scale %in% names(time_unit)) stop("time_scale has to be 'year', 'month', 'week' or 'day'") schresid <- residuals(coxobj, type = "schoenfeld") - plotX <- as.numeric(names(schresid)) / timeUnit[[time_scale]] - if (log_time) plotX <- log(plotX) + plot_x <- as.numeric(names(schresid)) / time_unit[[time_scale]] + if (log_time) plot_x <- log(plot_x) par(mfrow = c(1, 1), bty = "n", tcl = -0.15, mgp = c(2.3, 0.5, 0)) plot(schresid ~ plotX, cex = 0.9, col = "navyblue", yaxt = "n", ylab = "Unscaled Schoenfeld Residual", xlab = paste0(ifelse(log_time, "Log-", ""), "Time in ", time_scale), main = paste0( - "Diagnosis Plot: Unscaled Schoenfeld Residual\nEndpoint: ", endpoint_name, + "Diagnostic Plot: Unscaled Schoenfeld Residual\nEndpoint: ", endpoint_name, ifelse(subtitle == "", "", "\n"), subtitle ) ) diff --git a/inst/extdata/adsl.csv b/inst/extdata/adsl.csv index 112719f1..23447c16 100644 --- a/inst/extdata/adsl.csv +++ b/inst/extdata/adsl.csv @@ -1,501 +1,501 @@ -"USUBJID","ARM","AGE","SEX","SMOKE","ECOG0" -"001","A",45,"Male",0,0 -"002","A",71,"Male",0,0 -"003","A",58,"Male",1,1 -"004","A",48,"Female",0,1 -"005","A",69,"Male",0,1 -"006","A",48,"Female",0,1 -"007","A",47,"Male",1,0 -"008","A",61,"Male",1,0 -"009","A",54,"Female",1,1 -"010","A",56,"Female",1,0 -"011","A",63,"Female",0,0 -"012","A",50,"Female",0,0 -"013","A",57,"Male",0,1 -"014","A",62,"Female",1,1 -"015","A",57,"Female",0,1 -"016","A",66,"Male",0,0 -"017","A",75,"Male",1,1 -"018","A",47,"Female",0,0 -"019","A",57,"Male",0,0 -"020","A",54,"Male",0,0 -"021","A",55,"Male",1,0 -"022","A",64,"Male",0,1 -"023","A",53,"Female",1,0 -"024","A",58,"Male",1,1 -"025","A",47,"Male",0,0 -"026","A",60,"Female",1,0 -"027","A",49,"Female",0,1 -"028","A",55,"Female",0,0 -"029","A",66,"Female",0,1 -"030","A",58,"Male",0,1 -"031","A",49,"Male",0,1 -"032","A",61,"Male",0,0 -"033","A",66,"Male",1,0 -"034","A",45,"Male",0,0 -"035","A",59,"Female",1,1 -"036","A",74,"Female",1,0 -"037","A",73,"Female",0,0 -"038","A",74,"Male",0,1 -"039","A",54,"Male",0,0 -"040","A",58,"Female",1,1 -"041","A",61,"Female",0,1 -"042","A",47,"Female",1,1 -"043","A",73,"Female",1,1 -"044","A",68,"Male",0,0 -"045","A",49,"Female",0,0 -"046","A",71,"Female",0,0 -"047","A",70,"Male",0,1 -"048","A",62,"Female",1,0 -"049","A",49,"Male",0,0 -"050","A",74,"Female",0,0 -"051","A",46,"Female",0,1 -"052","A",68,"Female",1,0 -"053","A",46,"Male",1,0 -"054","A",75,"Female",1,1 -"055","A",47,"Female",0,0 -"056","A",56,"Male",0,1 -"057","A",72,"Female",0,0 -"058","A",57,"Male",1,1 -"059","A",46,"Male",0,0 -"060","A",56,"Female",1,1 -"061","A",73,"Male",0,1 -"062","A",60,"Female",1,1 -"063","A",75,"Male",0,0 -"064","A",69,"Female",1,1 -"065","A",47,"Female",0,1 -"066","A",74,"Male",0,0 -"067","A",71,"Female",0,1 -"068","A",49,"Female",1,1 -"069","A",68,"Male",0,0 -"070","A",49,"Male",0,1 -"071","A",70,"Male",0,1 -"072","A",45,"Female",0,0 -"073","A",47,"Female",0,1 -"074","A",58,"Male",0,1 -"075","A",49,"Female",0,1 -"076","A",68,"Female",0,0 -"077","A",60,"Male",0,0 -"078","A",45,"Female",1,0 -"079","A",57,"Female",0,0 -"080","A",50,"Female",0,1 -"081","A",63,"Male",0,1 -"082","A",47,"Female",0,0 -"083","A",68,"Female",0,1 -"084","A",51,"Male",0,0 -"085","A",60,"Male",0,0 -"086","A",52,"Female",1,0 -"087","A",69,"Male",1,1 -"088","A",70,"Female",0,1 -"089","A",72,"Male",0,0 -"090","A",46,"Female",0,1 -"091","A",51,"Male",1,0 -"092","A",69,"Female",0,1 -"093","A",66,"Male",0,0 -"094","A",73,"Male",0,1 -"095","A",73,"Female",1,0 -"096","A",62,"Female",0,1 -"097","A",55,"Female",0,0 -"098","A",67,"Male",1,0 -"099","A",54,"Female",1,0 -"100","A",52,"Female",1,1 -"101","A",57,"Male",0,0 -"102","A",57,"Female",1,1 -"103","A",57,"Male",0,0 -"104","A",67,"Female",1,1 -"105","A",67,"Female",1,1 -"106","A",74,"Female",1,1 -"107","A",72,"Female",1,0 -"108","A",73,"Female",0,0 -"109","A",57,"Female",0,0 -"110","A",69,"Female",1,0 -"111","A",55,"Male",0,0 -"112","A",74,"Female",0,0 -"113","A",68,"Female",0,0 -"114","A",53,"Male",0,0 -"115","A",69,"Male",0,0 -"116","A",68,"Male",0,1 -"117","A",58,"Male",0,0 -"118","A",64,"Female",0,0 -"119","A",71,"Male",0,0 -"120","A",69,"Female",0,1 -"121","A",64,"Female",1,0 -"122","A",64,"Male",1,0 -"123","A",55,"Male",0,1 -"124","A",74,"Male",0,0 -"125","A",50,"Male",0,1 -"126","A",68,"Male",0,1 -"127","A",60,"Male",0,0 -"128","A",59,"Female",0,0 -"129","A",71,"Female",1,0 -"130","A",69,"Male",0,1 -"131","A",56,"Female",0,1 -"132","A",51,"Male",0,1 -"133","A",65,"Male",0,1 -"134","A",45,"Male",1,1 -"135","A",49,"Female",0,0 -"136","A",74,"Female",1,0 -"137","A",71,"Female",1,1 -"138","A",65,"Male",0,0 -"139","A",67,"Female",0,0 -"140","A",48,"Female",0,0 -"141","A",70,"Female",0,1 -"142","A",72,"Female",0,0 -"143","A",53,"Male",1,1 -"144","A",68,"Female",1,0 -"145","A",65,"Male",0,1 -"146","A",70,"Female",1,1 -"147","A",58,"Male",0,0 -"148","A",68,"Female",0,1 -"149","A",54,"Female",0,0 -"150","A",75,"Female",1,1 -"151","A",49,"Female",1,1 -"152","A",60,"Male",0,0 -"153","A",45,"Female",1,0 -"154","A",73,"Female",1,0 -"155","A",71,"Female",0,1 -"156","A",73,"Female",0,0 -"157","A",58,"Female",0,0 -"158","A",59,"Female",0,1 -"159","A",75,"Female",0,1 -"160","A",65,"Male",0,0 -"161","A",48,"Male",1,0 -"162","A",63,"Female",0,1 -"163","A",74,"Female",0,0 -"164","A",64,"Female",0,0 -"165","A",49,"Female",0,0 -"166","A",56,"Female",0,1 -"167","A",56,"Female",0,1 -"168","A",48,"Female",0,0 -"169","A",65,"Male",0,1 -"170","A",53,"Female",0,0 -"171","A",72,"Male",0,0 -"172","A",75,"Female",1,0 -"173","A",70,"Female",0,1 -"174","A",53,"Female",1,0 -"175","A",45,"Female",1,1 -"176","A",53,"Female",1,1 -"177","A",52,"Female",0,1 -"178","A",61,"Female",1,0 -"179","A",70,"Male",0,0 -"180","A",58,"Female",0,0 -"181","A",54,"Male",0,0 -"182","A",53,"Male",0,0 -"183","A",74,"Male",0,0 -"184","A",64,"Male",0,1 -"185","A",52,"Male",0,0 -"186","A",73,"Female",0,0 -"187","A",55,"Female",1,0 -"188","A",71,"Female",0,0 -"189","A",57,"Female",1,0 -"190","A",49,"Female",1,0 -"191","A",69,"Male",0,0 -"192","A",74,"Female",1,0 -"193","A",59,"Female",0,0 -"194","A",53,"Male",0,0 -"195","A",52,"Female",0,1 -"196","A",47,"Female",1,1 -"197","A",61,"Female",0,0 -"198","A",51,"Female",0,0 -"199","A",62,"Female",1,0 -"200","A",59,"Female",1,0 -"201","A",58,"Male",0,0 -"202","A",61,"Female",0,1 -"203","A",45,"Female",0,0 -"204","A",59,"Male",1,1 -"205","A",58,"Female",1,0 -"206","A",67,"Male",0,0 -"207","A",51,"Female",1,0 -"208","A",68,"Male",1,1 -"209","A",53,"Female",1,0 -"210","A",64,"Male",1,0 -"211","A",61,"Male",0,1 -"212","A",52,"Male",1,0 -"213","A",57,"Female",0,1 -"214","A",57,"Female",1,0 -"215","A",49,"Female",0,0 -"216","A",51,"Male",1,1 -"217","A",60,"Female",0,0 -"218","A",60,"Female",1,0 -"219","A",71,"Female",0,0 -"220","A",54,"Female",0,0 -"221","A",51,"Male",1,0 -"222","A",71,"Male",0,1 -"223","A",47,"Male",0,0 -"224","A",65,"Male",0,0 -"225","A",53,"Female",0,0 -"226","A",56,"Female",0,0 -"227","A",51,"Male",1,0 -"228","A",68,"Female",0,0 -"229","A",75,"Female",0,1 -"230","A",49,"Female",0,0 -"231","A",74,"Male",1,0 -"232","A",66,"Female",0,0 -"233","A",74,"Female",0,0 -"234","A",62,"Female",0,1 -"235","A",53,"Female",0,0 -"236","A",62,"Female",0,1 -"237","A",70,"Female",1,0 -"238","A",60,"Female",1,0 -"239","A",72,"Male",0,0 -"240","A",74,"Female",1,0 -"241","A",47,"Female",1,0 -"242","A",54,"Female",0,1 -"243","A",65,"Female",0,1 -"244","A",74,"Male",0,1 -"245","A",61,"Male",0,1 -"246","A",54,"Female",1,0 -"247","A",65,"Male",0,0 -"248","A",72,"Female",1,0 -"249","A",71,"Female",1,1 -"250","A",65,"Male",0,0 -"251","A",58,"Male",0,1 -"252","A",46,"Male",0,0 -"253","A",53,"Female",1,0 -"254","A",71,"Female",1,0 -"255","A",47,"Male",0,1 -"256","A",45,"Male",0,0 -"257","A",50,"Male",0,0 -"258","A",67,"Female",1,0 -"259","A",72,"Male",1,0 -"260","A",45,"Female",0,1 -"261","A",75,"Female",1,0 -"262","A",65,"Male",0,0 -"263","A",60,"Female",0,1 -"264","A",75,"Female",0,1 -"265","A",60,"Female",1,0 -"266","A",49,"Female",1,0 -"267","A",58,"Female",0,1 -"268","A",57,"Male",1,1 -"269","A",69,"Male",1,0 -"270","A",51,"Male",0,1 -"271","A",54,"Female",1,0 -"272","A",55,"Male",0,1 -"273","A",49,"Female",0,0 -"274","A",74,"Female",1,0 -"275","A",55,"Male",1,0 -"276","A",52,"Female",1,0 -"277","A",65,"Male",0,0 -"278","A",70,"Female",1,0 -"279","A",66,"Female",1,1 -"280","A",63,"Female",0,1 -"281","A",61,"Female",0,1 -"282","A",65,"Male",0,1 -"283","A",73,"Male",0,0 -"284","A",55,"Female",1,1 -"285","A",56,"Female",1,1 -"286","A",68,"Female",0,1 -"287","A",74,"Female",1,0 -"288","A",67,"Female",0,0 -"289","A",66,"Male",0,1 -"290","A",48,"Female",0,0 -"291","A",49,"Female",1,1 -"292","A",60,"Female",1,1 -"293","A",69,"Female",0,1 -"294","A",58,"Female",0,1 -"295","A",45,"Female",1,1 -"296","A",49,"Female",0,1 -"297","A",67,"Female",1,0 -"298","A",63,"Male",0,0 -"299","A",50,"Female",0,0 -"300","A",68,"Female",0,1 -"301","A",53,"Male",0,1 -"302","A",63,"Male",0,1 -"303","A",58,"Male",0,0 -"304","A",70,"Female",0,1 -"305","A",56,"Female",0,0 -"306","A",56,"Male",0,1 -"307","A",61,"Female",0,0 -"308","A",72,"Male",0,0 -"309","A",51,"Male",0,1 -"310","A",72,"Male",0,0 -"311","A",64,"Female",0,0 -"312","A",59,"Male",0,0 -"313","A",75,"Female",0,0 -"314","A",75,"Female",0,0 -"315","A",74,"Male",0,0 -"316","A",54,"Male",0,1 -"317","A",55,"Female",0,0 -"318","A",52,"Female",1,0 -"319","A",46,"Female",0,1 -"320","A",53,"Male",0,0 -"321","A",54,"Female",0,1 -"322","A",62,"Female",0,0 -"323","A",54,"Male",1,0 -"324","A",56,"Female",0,0 -"325","A",48,"Female",0,0 -"326","A",52,"Female",0,1 -"327","A",55,"Female",0,1 -"328","A",69,"Female",0,0 -"329","A",48,"Female",0,0 -"330","A",48,"Female",1,1 -"331","A",60,"Male",0,0 -"332","A",74,"Female",0,1 -"333","A",45,"Female",0,0 -"334","A",64,"Male",1,0 -"335","A",75,"Female",1,1 -"336","A",62,"Female",0,0 -"337","A",71,"Male",0,0 -"338","A",48,"Female",1,1 -"339","A",53,"Female",0,0 -"340","A",62,"Male",0,0 -"341","A",69,"Female",0,0 -"342","A",72,"Female",0,0 -"343","A",61,"Female",0,0 -"344","A",47,"Male",0,0 -"345","A",58,"Male",0,1 -"346","A",52,"Female",0,0 -"347","A",49,"Female",0,0 -"348","A",51,"Female",0,0 -"349","A",51,"Female",1,1 -"350","A",72,"Male",0,0 -"351","A",68,"Male",0,0 -"352","A",49,"Female",0,0 -"353","A",45,"Female",0,0 -"354","A",49,"Female",0,0 -"355","A",65,"Male",0,1 -"356","A",56,"Male",0,0 -"357","A",45,"Female",1,1 -"358","A",57,"Male",1,0 -"359","A",53,"Male",1,1 -"360","A",65,"Female",0,0 -"361","A",57,"Male",0,1 -"362","A",55,"Female",0,1 -"363","A",57,"Male",0,1 -"364","A",46,"Female",0,1 -"365","A",69,"Female",0,1 -"366","A",67,"Female",0,1 -"367","A",55,"Male",0,0 -"368","A",53,"Female",0,1 -"369","A",46,"Female",0,0 -"370","A",71,"Male",0,0 -"371","A",68,"Male",0,1 -"372","A",49,"Female",0,1 -"373","A",51,"Female",0,0 -"374","A",65,"Female",1,1 -"375","A",55,"Female",0,0 -"376","A",53,"Male",0,0 -"377","A",65,"Female",0,1 -"378","A",72,"Female",1,1 -"379","A",61,"Male",0,1 -"380","A",73,"Female",0,0 -"381","A",62,"Female",1,1 -"382","A",46,"Male",0,0 -"383","A",51,"Male",0,1 -"384","A",60,"Male",1,1 -"385","A",56,"Female",0,1 -"386","A",69,"Female",0,1 -"387","A",58,"Female",1,1 -"388","A",58,"Female",1,1 -"389","A",53,"Female",0,1 -"390","A",47,"Female",0,0 -"391","A",59,"Male",0,1 -"392","A",47,"Female",0,0 -"393","A",60,"Female",1,0 -"394","A",73,"Female",0,0 -"395","A",60,"Male",0,0 -"396","A",75,"Male",0,0 -"397","A",65,"Female",0,0 -"398","A",68,"Male",0,0 -"399","A",55,"Female",0,0 -"400","A",46,"Female",1,0 -"401","A",45,"Female",0,1 -"402","A",70,"Male",1,1 -"403","A",56,"Female",0,1 -"404","A",62,"Female",0,0 -"405","A",49,"Male",0,0 -"406","A",52,"Female",0,0 -"407","A",67,"Female",0,1 -"408","A",50,"Female",1,1 -"409","A",68,"Female",1,1 -"410","A",54,"Female",0,0 -"411","A",65,"Male",0,0 -"412","A",55,"Female",0,1 -"413","A",53,"Female",1,1 -"414","A",71,"Female",0,0 -"415","A",48,"Male",0,0 -"416","A",54,"Female",0,1 -"417","A",75,"Male",1,0 -"418","A",53,"Female",0,0 -"419","A",50,"Female",1,0 -"420","A",64,"Female",1,0 -"421","A",65,"Female",0,0 -"422","A",65,"Female",0,1 -"423","A",60,"Female",1,0 -"424","A",70,"Female",1,0 -"425","A",51,"Female",0,0 -"426","A",45,"Female",0,1 -"427","A",75,"Female",1,0 -"428","A",52,"Female",1,0 -"429","A",70,"Male",0,0 -"430","A",69,"Female",1,1 -"431","A",64,"Female",0,0 -"432","A",68,"Female",1,0 -"433","A",51,"Male",1,0 -"434","A",59,"Female",0,1 -"435","A",57,"Female",0,0 -"436","A",47,"Male",0,0 -"437","A",65,"Male",0,1 -"438","A",65,"Male",0,1 -"439","A",65,"Male",0,0 -"440","A",46,"Male",0,0 -"441","A",64,"Female",0,0 -"442","A",57,"Female",0,1 -"443","A",67,"Female",0,1 -"444","A",61,"Female",1,0 -"445","A",56,"Male",0,0 -"446","A",52,"Male",0,0 -"447","A",74,"Female",1,1 -"448","A",75,"Male",0,1 -"449","A",58,"Male",0,1 -"450","A",57,"Female",0,1 -"451","A",55,"Female",0,0 -"452","A",53,"Female",1,0 -"453","A",75,"Male",1,0 -"454","A",65,"Female",0,1 -"455","A",65,"Female",0,0 -"456","A",58,"Male",0,0 -"457","A",71,"Female",0,0 -"458","A",71,"Male",0,0 -"459","A",59,"Male",1,0 -"460","A",46,"Male",1,0 -"461","A",51,"Female",0,0 -"462","A",56,"Female",0,1 -"463","A",66,"Female",0,0 -"464","A",59,"Female",1,0 -"465","A",48,"Female",1,0 -"466","A",68,"Female",0,0 -"467","A",57,"Female",0,0 -"468","A",63,"Male",0,0 -"469","A",62,"Male",0,1 -"470","A",70,"Female",0,0 -"471","A",55,"Female",0,1 -"472","A",56,"Male",1,0 -"473","A",51,"Male",1,0 -"474","A",51,"Female",0,0 -"475","A",46,"Female",1,1 -"476","A",52,"Male",0,0 -"477","A",71,"Male",0,1 -"478","A",54,"Male",1,0 -"479","A",55,"Male",0,1 -"480","A",46,"Female",0,0 -"481","A",70,"Female",0,0 -"482","A",68,"Female",0,1 -"483","A",50,"Male",0,1 -"484","A",45,"Female",0,0 -"485","A",68,"Male",0,0 -"486","A",56,"Male",0,1 -"487","A",59,"Male",0,1 -"488","A",51,"Male",1,1 -"489","A",61,"Female",1,0 -"490","A",60,"Female",0,1 -"491","A",68,"Female",1,0 -"492","A",67,"Male",1,1 -"493","A",45,"Male",1,1 -"494","A",71,"Female",0,1 -"495","A",55,"Male",0,1 -"496","A",72,"Female",0,0 -"497","A",48,"Female",1,0 -"498","A",68,"Female",1,0 -"499","A",45,"Female",0,0 -"500","A",58,"Female",1,1 +"","USUBJID","ARM","AGE","SEX","SMOKE","ECOG0","N_PR_THER" +"1",1,"A",45,"Male",0,0,4 +"2",2,"A",71,"Male",0,0,3 +"3",3,"A",58,"Male",1,1,2 +"4",4,"A",48,"Female",0,1,4 +"5",5,"A",69,"Male",0,1,4 +"6",6,"A",48,"Female",0,1,4 +"7",7,"A",47,"Male",1,0,3 +"8",8,"A",61,"Male",1,0,1 +"9",9,"A",54,"Female",1,1,1 +"10",10,"A",56,"Female",1,0,3 +"11",11,"A",63,"Female",0,0,4 +"12",12,"A",50,"Female",0,0,1 +"13",13,"A",57,"Male",0,1,3 +"14",14,"A",62,"Female",1,1,1 +"15",15,"A",57,"Female",0,1,3 +"16",16,"A",66,"Male",0,0,2 +"17",17,"A",75,"Male",1,1,3 +"18",18,"A",47,"Female",0,0,4 +"19",19,"A",57,"Male",0,0,3 +"20",20,"A",54,"Male",0,0,3 +"21",21,"A",55,"Male",1,0,3 +"22",22,"A",64,"Male",0,1,3 +"23",23,"A",53,"Female",1,0,3 +"24",24,"A",58,"Male",1,1,2 +"25",25,"A",47,"Male",0,0,1 +"26",26,"A",60,"Female",1,0,1 +"27",27,"A",49,"Female",0,1,3 +"28",28,"A",55,"Female",0,0,1 +"29",29,"A",66,"Female",0,1,2 +"30",30,"A",58,"Male",0,1,4 +"31",31,"A",49,"Male",0,1,4 +"32",32,"A",61,"Male",0,0,4 +"33",33,"A",66,"Male",1,0,3 +"34",34,"A",45,"Male",0,0,1 +"35",35,"A",59,"Female",1,1,2 +"36",36,"A",74,"Female",1,0,4 +"37",37,"A",73,"Female",0,0,3 +"38",38,"A",74,"Male",0,1,4 +"39",39,"A",54,"Male",0,0,1 +"40",40,"A",58,"Female",1,1,1 +"41",41,"A",61,"Female",0,1,3 +"42",42,"A",47,"Female",1,1,2 +"43",43,"A",73,"Female",1,1,2 +"44",44,"A",68,"Male",0,0,1 +"45",45,"A",49,"Female",0,0,3 +"46",46,"A",71,"Female",0,0,2 +"47",47,"A",70,"Male",0,1,4 +"48",48,"A",62,"Female",1,0,1 +"49",49,"A",49,"Male",0,0,1 +"50",50,"A",74,"Female",0,0,1 +"51",51,"A",46,"Female",0,1,3 +"52",52,"A",68,"Female",1,0,3 +"53",53,"A",46,"Male",1,0,2 +"54",54,"A",75,"Female",1,1,3 +"55",55,"A",47,"Female",0,0,3 +"56",56,"A",56,"Male",0,1,3 +"57",57,"A",72,"Female",0,0,3 +"58",58,"A",57,"Male",1,1,4 +"59",59,"A",46,"Male",0,0,1 +"60",60,"A",56,"Female",1,1,1 +"61",61,"A",73,"Male",0,1,2 +"62",62,"A",60,"Female",1,1,3 +"63",63,"A",75,"Male",0,0,2 +"64",64,"A",69,"Female",1,1,2 +"65",65,"A",47,"Female",0,1,1 +"66",66,"A",74,"Male",0,0,4 +"67",67,"A",71,"Female",0,1,1 +"68",68,"A",49,"Female",1,1,1 +"69",69,"A",68,"Male",0,0,3 +"70",70,"A",49,"Male",0,1,1 +"71",71,"A",70,"Male",0,1,1 +"72",72,"A",45,"Female",0,0,2 +"73",73,"A",47,"Female",0,1,3 +"74",74,"A",58,"Male",0,1,3 +"75",75,"A",49,"Female",0,1,4 +"76",76,"A",68,"Female",0,0,1 +"77",77,"A",60,"Male",0,0,4 +"78",78,"A",45,"Female",1,0,1 +"79",79,"A",57,"Female",0,0,1 +"80",80,"A",50,"Female",0,1,1 +"81",81,"A",63,"Male",0,1,3 +"82",82,"A",47,"Female",0,0,2 +"83",83,"A",68,"Female",0,1,4 +"84",84,"A",51,"Male",0,0,4 +"85",85,"A",60,"Male",0,0,1 +"86",86,"A",52,"Female",1,0,4 +"87",87,"A",69,"Male",1,1,1 +"88",88,"A",70,"Female",0,1,4 +"89",89,"A",72,"Male",0,0,2 +"90",90,"A",46,"Female",0,1,1 +"91",91,"A",51,"Male",1,0,4 +"92",92,"A",69,"Female",0,1,1 +"93",93,"A",66,"Male",0,0,1 +"94",94,"A",73,"Male",0,1,1 +"95",95,"A",73,"Female",1,0,3 +"96",96,"A",62,"Female",0,1,2 +"97",97,"A",55,"Female",0,0,4 +"98",98,"A",67,"Male",1,0,3 +"99",99,"A",54,"Female",1,0,3 +"100",100,"A",52,"Female",1,1,4 +"101",101,"A",57,"Male",0,0,2 +"102",102,"A",57,"Female",1,1,3 +"103",103,"A",57,"Male",0,0,3 +"104",104,"A",67,"Female",1,1,2 +"105",105,"A",67,"Female",1,1,2 +"106",106,"A",74,"Female",1,1,2 +"107",107,"A",72,"Female",1,0,2 +"108",108,"A",73,"Female",0,0,3 +"109",109,"A",57,"Female",0,0,4 +"110",110,"A",69,"Female",1,0,1 +"111",111,"A",55,"Male",0,0,1 +"112",112,"A",74,"Female",0,0,4 +"113",113,"A",68,"Female",0,0,4 +"114",114,"A",53,"Male",0,0,2 +"115",115,"A",69,"Male",0,0,2 +"116",116,"A",68,"Male",0,1,2 +"117",117,"A",58,"Male",0,0,1 +"118",118,"A",64,"Female",0,0,3 +"119",119,"A",71,"Male",0,0,1 +"120",120,"A",69,"Female",0,1,2 +"121",121,"A",64,"Female",1,0,4 +"122",122,"A",64,"Male",1,0,1 +"123",123,"A",55,"Male",0,1,3 +"124",124,"A",74,"Male",0,0,3 +"125",125,"A",50,"Male",0,1,3 +"126",126,"A",68,"Male",0,1,1 +"127",127,"A",60,"Male",0,0,2 +"128",128,"A",59,"Female",0,0,3 +"129",129,"A",71,"Female",1,0,3 +"130",130,"A",69,"Male",0,1,4 +"131",131,"A",56,"Female",0,1,1 +"132",132,"A",51,"Male",0,1,3 +"133",133,"A",65,"Male",0,1,2 +"134",134,"A",45,"Male",1,1,3 +"135",135,"A",49,"Female",0,0,2 +"136",136,"A",74,"Female",1,0,4 +"137",137,"A",71,"Female",1,1,3 +"138",138,"A",65,"Male",0,0,1 +"139",139,"A",67,"Female",0,0,2 +"140",140,"A",48,"Female",0,0,3 +"141",141,"A",70,"Female",0,1,4 +"142",142,"A",72,"Female",0,0,1 +"143",143,"A",53,"Male",1,1,4 +"144",144,"A",68,"Female",1,0,3 +"145",145,"A",65,"Male",0,1,1 +"146",146,"A",70,"Female",1,1,4 +"147",147,"A",58,"Male",0,0,2 +"148",148,"A",68,"Female",0,1,4 +"149",149,"A",54,"Female",0,0,4 +"150",150,"A",75,"Female",1,1,4 +"151",151,"A",49,"Female",1,1,3 +"152",152,"A",60,"Male",0,0,4 +"153",153,"A",45,"Female",1,0,4 +"154",154,"A",73,"Female",1,0,3 +"155",155,"A",71,"Female",0,1,3 +"156",156,"A",73,"Female",0,0,3 +"157",157,"A",58,"Female",0,0,4 +"158",158,"A",59,"Female",0,1,2 +"159",159,"A",75,"Female",0,1,2 +"160",160,"A",65,"Male",0,0,2 +"161",161,"A",48,"Male",1,0,2 +"162",162,"A",63,"Female",0,1,2 +"163",163,"A",74,"Female",0,0,3 +"164",164,"A",64,"Female",0,0,3 +"165",165,"A",49,"Female",0,0,1 +"166",166,"A",56,"Female",0,1,4 +"167",167,"A",56,"Female",0,1,2 +"168",168,"A",48,"Female",0,0,1 +"169",169,"A",65,"Male",0,1,3 +"170",170,"A",53,"Female",0,0,3 +"171",171,"A",72,"Male",0,0,2 +"172",172,"A",75,"Female",1,0,4 +"173",173,"A",70,"Female",0,1,2 +"174",174,"A",53,"Female",1,0,2 +"175",175,"A",45,"Female",1,1,3 +"176",176,"A",53,"Female",1,1,3 +"177",177,"A",52,"Female",0,1,2 +"178",178,"A",61,"Female",1,0,4 +"179",179,"A",70,"Male",0,0,3 +"180",180,"A",58,"Female",0,0,3 +"181",181,"A",54,"Male",0,0,1 +"182",182,"A",53,"Male",0,0,2 +"183",183,"A",74,"Male",0,0,2 +"184",184,"A",64,"Male",0,1,3 +"185",185,"A",52,"Male",0,0,1 +"186",186,"A",73,"Female",0,0,3 +"187",187,"A",55,"Female",1,0,4 +"188",188,"A",71,"Female",0,0,3 +"189",189,"A",57,"Female",1,0,3 +"190",190,"A",49,"Female",1,0,2 +"191",191,"A",69,"Male",0,0,4 +"192",192,"A",74,"Female",1,0,2 +"193",193,"A",59,"Female",0,0,3 +"194",194,"A",53,"Male",0,0,4 +"195",195,"A",52,"Female",0,1,3 +"196",196,"A",47,"Female",1,1,1 +"197",197,"A",61,"Female",0,0,4 +"198",198,"A",51,"Female",0,0,2 +"199",199,"A",62,"Female",1,0,1 +"200",200,"A",59,"Female",1,0,2 +"201",201,"A",58,"Male",0,0,2 +"202",202,"A",61,"Female",0,1,4 +"203",203,"A",45,"Female",0,0,1 +"204",204,"A",59,"Male",1,1,2 +"205",205,"A",58,"Female",1,0,2 +"206",206,"A",67,"Male",0,0,1 +"207",207,"A",51,"Female",1,0,2 +"208",208,"A",68,"Male",1,1,3 +"209",209,"A",53,"Female",1,0,2 +"210",210,"A",64,"Male",1,0,3 +"211",211,"A",61,"Male",0,1,1 +"212",212,"A",52,"Male",1,0,2 +"213",213,"A",57,"Female",0,1,4 +"214",214,"A",57,"Female",1,0,2 +"215",215,"A",49,"Female",0,0,4 +"216",216,"A",51,"Male",1,1,3 +"217",217,"A",60,"Female",0,0,2 +"218",218,"A",60,"Female",1,0,1 +"219",219,"A",71,"Female",0,0,3 +"220",220,"A",54,"Female",0,0,1 +"221",221,"A",51,"Male",1,0,1 +"222",222,"A",71,"Male",0,1,3 +"223",223,"A",47,"Male",0,0,2 +"224",224,"A",65,"Male",0,0,1 +"225",225,"A",53,"Female",0,0,1 +"226",226,"A",56,"Female",0,0,1 +"227",227,"A",51,"Male",1,0,4 +"228",228,"A",68,"Female",0,0,2 +"229",229,"A",75,"Female",0,1,1 +"230",230,"A",49,"Female",0,0,2 +"231",231,"A",74,"Male",1,0,1 +"232",232,"A",66,"Female",0,0,1 +"233",233,"A",74,"Female",0,0,1 +"234",234,"A",62,"Female",0,1,2 +"235",235,"A",53,"Female",0,0,1 +"236",236,"A",62,"Female",0,1,1 +"237",237,"A",70,"Female",1,0,3 +"238",238,"A",60,"Female",1,0,2 +"239",239,"A",72,"Male",0,0,1 +"240",240,"A",74,"Female",1,0,3 +"241",241,"A",47,"Female",1,0,3 +"242",242,"A",54,"Female",0,1,3 +"243",243,"A",65,"Female",0,1,2 +"244",244,"A",74,"Male",0,1,1 +"245",245,"A",61,"Male",0,1,2 +"246",246,"A",54,"Female",1,0,3 +"247",247,"A",65,"Male",0,0,3 +"248",248,"A",72,"Female",1,0,3 +"249",249,"A",71,"Female",1,1,2 +"250",250,"A",65,"Male",0,0,3 +"251",251,"A",58,"Male",0,1,1 +"252",252,"A",46,"Male",0,0,1 +"253",253,"A",53,"Female",1,0,4 +"254",254,"A",71,"Female",1,0,4 +"255",255,"A",47,"Male",0,1,3 +"256",256,"A",45,"Male",0,0,1 +"257",257,"A",50,"Male",0,0,3 +"258",258,"A",67,"Female",1,0,3 +"259",259,"A",72,"Male",1,0,2 +"260",260,"A",45,"Female",0,1,2 +"261",261,"A",75,"Female",1,0,1 +"262",262,"A",65,"Male",0,0,3 +"263",263,"A",60,"Female",0,1,3 +"264",264,"A",75,"Female",0,1,4 +"265",265,"A",60,"Female",1,0,4 +"266",266,"A",49,"Female",1,0,2 +"267",267,"A",58,"Female",0,1,1 +"268",268,"A",57,"Male",1,1,3 +"269",269,"A",69,"Male",1,0,2 +"270",270,"A",51,"Male",0,1,1 +"271",271,"A",54,"Female",1,0,4 +"272",272,"A",55,"Male",0,1,3 +"273",273,"A",49,"Female",0,0,4 +"274",274,"A",74,"Female",1,0,1 +"275",275,"A",55,"Male",1,0,1 +"276",276,"A",52,"Female",1,0,1 +"277",277,"A",65,"Male",0,0,2 +"278",278,"A",70,"Female",1,0,1 +"279",279,"A",66,"Female",1,1,2 +"280",280,"A",63,"Female",0,1,4 +"281",281,"A",61,"Female",0,1,3 +"282",282,"A",65,"Male",0,1,2 +"283",283,"A",73,"Male",0,0,2 +"284",284,"A",55,"Female",1,1,4 +"285",285,"A",56,"Female",1,1,4 +"286",286,"A",68,"Female",0,1,1 +"287",287,"A",74,"Female",1,0,4 +"288",288,"A",67,"Female",0,0,2 +"289",289,"A",66,"Male",0,1,3 +"290",290,"A",48,"Female",0,0,3 +"291",291,"A",49,"Female",1,1,3 +"292",292,"A",60,"Female",1,1,1 +"293",293,"A",69,"Female",0,1,4 +"294",294,"A",58,"Female",0,1,3 +"295",295,"A",45,"Female",1,1,4 +"296",296,"A",49,"Female",0,1,1 +"297",297,"A",67,"Female",1,0,4 +"298",298,"A",63,"Male",0,0,4 +"299",299,"A",50,"Female",0,0,2 +"300",300,"A",68,"Female",0,1,3 +"301",301,"A",53,"Male",0,1,2 +"302",302,"A",63,"Male",0,1,2 +"303",303,"A",58,"Male",0,0,4 +"304",304,"A",70,"Female",0,1,4 +"305",305,"A",56,"Female",0,0,1 +"306",306,"A",56,"Male",0,1,3 +"307",307,"A",61,"Female",0,0,3 +"308",308,"A",72,"Male",0,0,2 +"309",309,"A",51,"Male",0,1,1 +"310",310,"A",72,"Male",0,0,4 +"311",311,"A",64,"Female",0,0,3 +"312",312,"A",59,"Male",0,0,2 +"313",313,"A",75,"Female",0,0,3 +"314",314,"A",75,"Female",0,0,1 +"315",315,"A",74,"Male",0,0,2 +"316",316,"A",54,"Male",0,1,4 +"317",317,"A",55,"Female",0,0,3 +"318",318,"A",52,"Female",1,0,1 +"319",319,"A",46,"Female",0,1,1 +"320",320,"A",53,"Male",0,0,1 +"321",321,"A",54,"Female",0,1,1 +"322",322,"A",62,"Female",0,0,2 +"323",323,"A",54,"Male",1,0,4 +"324",324,"A",56,"Female",0,0,4 +"325",325,"A",48,"Female",0,0,1 +"326",326,"A",52,"Female",0,1,1 +"327",327,"A",55,"Female",0,1,3 +"328",328,"A",69,"Female",0,0,2 +"329",329,"A",48,"Female",0,0,1 +"330",330,"A",48,"Female",1,1,3 +"331",331,"A",60,"Male",0,0,3 +"332",332,"A",74,"Female",0,1,2 +"333",333,"A",45,"Female",0,0,1 +"334",334,"A",64,"Male",1,0,1 +"335",335,"A",75,"Female",1,1,3 +"336",336,"A",62,"Female",0,0,3 +"337",337,"A",71,"Male",0,0,4 +"338",338,"A",48,"Female",1,1,3 +"339",339,"A",53,"Female",0,0,2 +"340",340,"A",62,"Male",0,0,3 +"341",341,"A",69,"Female",0,0,2 +"342",342,"A",72,"Female",0,0,1 +"343",343,"A",61,"Female",0,0,2 +"344",344,"A",47,"Male",0,0,2 +"345",345,"A",58,"Male",0,1,1 +"346",346,"A",52,"Female",0,0,4 +"347",347,"A",49,"Female",0,0,4 +"348",348,"A",51,"Female",0,0,1 +"349",349,"A",51,"Female",1,1,2 +"350",350,"A",72,"Male",0,0,3 +"351",351,"A",68,"Male",0,0,3 +"352",352,"A",49,"Female",0,0,4 +"353",353,"A",45,"Female",0,0,3 +"354",354,"A",49,"Female",0,0,3 +"355",355,"A",65,"Male",0,1,2 +"356",356,"A",56,"Male",0,0,2 +"357",357,"A",45,"Female",1,1,1 +"358",358,"A",57,"Male",1,0,2 +"359",359,"A",53,"Male",1,1,2 +"360",360,"A",65,"Female",0,0,2 +"361",361,"A",57,"Male",0,1,4 +"362",362,"A",55,"Female",0,1,4 +"363",363,"A",57,"Male",0,1,2 +"364",364,"A",46,"Female",0,1,4 +"365",365,"A",69,"Female",0,1,1 +"366",366,"A",67,"Female",0,1,3 +"367",367,"A",55,"Male",0,0,1 +"368",368,"A",53,"Female",0,1,3 +"369",369,"A",46,"Female",0,0,3 +"370",370,"A",71,"Male",0,0,4 +"371",371,"A",68,"Male",0,1,1 +"372",372,"A",49,"Female",0,1,3 +"373",373,"A",51,"Female",0,0,3 +"374",374,"A",65,"Female",1,1,3 +"375",375,"A",55,"Female",0,0,4 +"376",376,"A",53,"Male",0,0,4 +"377",377,"A",65,"Female",0,1,4 +"378",378,"A",72,"Female",1,1,4 +"379",379,"A",61,"Male",0,1,1 +"380",380,"A",73,"Female",0,0,1 +"381",381,"A",62,"Female",1,1,2 +"382",382,"A",46,"Male",0,0,2 +"383",383,"A",51,"Male",0,1,4 +"384",384,"A",60,"Male",1,1,4 +"385",385,"A",56,"Female",0,1,3 +"386",386,"A",69,"Female",0,1,1 +"387",387,"A",58,"Female",1,1,2 +"388",388,"A",58,"Female",1,1,3 +"389",389,"A",53,"Female",0,1,2 +"390",390,"A",47,"Female",0,0,2 +"391",391,"A",59,"Male",0,1,2 +"392",392,"A",47,"Female",0,0,4 +"393",393,"A",60,"Female",1,0,4 +"394",394,"A",73,"Female",0,0,4 +"395",395,"A",60,"Male",0,0,1 +"396",396,"A",75,"Male",0,0,4 +"397",397,"A",65,"Female",0,0,3 +"398",398,"A",68,"Male",0,0,1 +"399",399,"A",55,"Female",0,0,4 +"400",400,"A",46,"Female",1,0,4 +"401",401,"A",45,"Female",0,1,1 +"402",402,"A",70,"Male",1,1,3 +"403",403,"A",56,"Female",0,1,4 +"404",404,"A",62,"Female",0,0,3 +"405",405,"A",49,"Male",0,0,4 +"406",406,"A",52,"Female",0,0,4 +"407",407,"A",67,"Female",0,1,4 +"408",408,"A",50,"Female",1,1,1 +"409",409,"A",68,"Female",1,1,2 +"410",410,"A",54,"Female",0,0,4 +"411",411,"A",65,"Male",0,0,4 +"412",412,"A",55,"Female",0,1,2 +"413",413,"A",53,"Female",1,1,4 +"414",414,"A",71,"Female",0,0,2 +"415",415,"A",48,"Male",0,0,1 +"416",416,"A",54,"Female",0,1,3 +"417",417,"A",75,"Male",1,0,3 +"418",418,"A",53,"Female",0,0,2 +"419",419,"A",50,"Female",1,0,4 +"420",420,"A",64,"Female",1,0,1 +"421",421,"A",65,"Female",0,0,2 +"422",422,"A",65,"Female",0,1,4 +"423",423,"A",60,"Female",1,0,2 +"424",424,"A",70,"Female",1,0,3 +"425",425,"A",51,"Female",0,0,2 +"426",426,"A",45,"Female",0,1,1 +"427",427,"A",75,"Female",1,0,2 +"428",428,"A",52,"Female",1,0,1 +"429",429,"A",70,"Male",0,0,4 +"430",430,"A",69,"Female",1,1,3 +"431",431,"A",64,"Female",0,0,2 +"432",432,"A",68,"Female",1,0,1 +"433",433,"A",51,"Male",1,0,1 +"434",434,"A",59,"Female",0,1,2 +"435",435,"A",57,"Female",0,0,1 +"436",436,"A",47,"Male",0,0,2 +"437",437,"A",65,"Male",0,1,1 +"438",438,"A",65,"Male",0,1,1 +"439",439,"A",65,"Male",0,0,2 +"440",440,"A",46,"Male",0,0,2 +"441",441,"A",64,"Female",0,0,3 +"442",442,"A",57,"Female",0,1,4 +"443",443,"A",67,"Female",0,1,3 +"444",444,"A",61,"Female",1,0,3 +"445",445,"A",56,"Male",0,0,4 +"446",446,"A",52,"Male",0,0,3 +"447",447,"A",74,"Female",1,1,3 +"448",448,"A",75,"Male",0,1,3 +"449",449,"A",58,"Male",0,1,3 +"450",450,"A",57,"Female",0,1,4 +"451",451,"A",55,"Female",0,0,1 +"452",452,"A",53,"Female",1,0,1 +"453",453,"A",75,"Male",1,0,4 +"454",454,"A",65,"Female",0,1,3 +"455",455,"A",65,"Female",0,0,4 +"456",456,"A",58,"Male",0,0,4 +"457",457,"A",71,"Female",0,0,3 +"458",458,"A",71,"Male",0,0,4 +"459",459,"A",59,"Male",1,0,4 +"460",460,"A",46,"Male",1,0,4 +"461",461,"A",51,"Female",0,0,4 +"462",462,"A",56,"Female",0,1,4 +"463",463,"A",66,"Female",0,0,1 +"464",464,"A",59,"Female",1,0,2 +"465",465,"A",48,"Female",1,0,2 +"466",466,"A",68,"Female",0,0,4 +"467",467,"A",57,"Female",0,0,4 +"468",468,"A",63,"Male",0,0,4 +"469",469,"A",62,"Male",0,1,3 +"470",470,"A",70,"Female",0,0,3 +"471",471,"A",55,"Female",0,1,2 +"472",472,"A",56,"Male",1,0,3 +"473",473,"A",51,"Male",1,0,1 +"474",474,"A",51,"Female",0,0,4 +"475",475,"A",46,"Female",1,1,3 +"476",476,"A",52,"Male",0,0,4 +"477",477,"A",71,"Male",0,1,4 +"478",478,"A",54,"Male",1,0,3 +"479",479,"A",55,"Male",0,1,2 +"480",480,"A",46,"Female",0,0,3 +"481",481,"A",70,"Female",0,0,1 +"482",482,"A",68,"Female",0,1,3 +"483",483,"A",50,"Male",0,1,1 +"484",484,"A",45,"Female",0,0,2 +"485",485,"A",68,"Male",0,0,1 +"486",486,"A",56,"Male",0,1,2 +"487",487,"A",59,"Male",0,1,3 +"488",488,"A",51,"Male",1,1,1 +"489",489,"A",61,"Female",1,0,3 +"490",490,"A",60,"Female",0,1,3 +"491",491,"A",68,"Female",1,0,2 +"492",492,"A",67,"Male",1,1,4 +"493",493,"A",45,"Male",1,1,2 +"494",494,"A",71,"Female",0,1,2 +"495",495,"A",55,"Male",0,1,3 +"496",496,"A",72,"Female",0,0,4 +"497",497,"A",48,"Female",1,0,3 +"498",498,"A",68,"Female",1,0,1 +"499",499,"A",45,"Female",0,0,1 +"500",500,"A",58,"Female",1,1,3 diff --git a/inst/extdata/aggregate_data_example_2.csv b/inst/extdata/aggregate_data_example_2.csv index 30b9d510..19c682a5 100644 --- a/inst/extdata/aggregate_data_example_2.csv +++ b/inst/extdata/aggregate_data_example_2.csv @@ -1,3 +1,3 @@ STUDY,ARM,N,AGE_MEAN,AGE_MEDIAN,AGE_SD,SEX_MALE_COUNT,ECOG0_COUNT,SMOKE_COUNT Study_XXXX,Intervention,149,49,50,3.10,72,53,29 -Study_XXXX,Comparator,151,54,53,3.32,75,52,29 \ No newline at end of file +Study_XXXX,Comparator,151,54,53,3.32,75,52,29 diff --git a/inst/extdata/aggregate_data_example_3.csv b/inst/extdata/aggregate_data_example_3.csv index 2a96102e..e278b7d9 100644 --- a/inst/extdata/aggregate_data_example_3.csv +++ b/inst/extdata/aggregate_data_example_3.csv @@ -1,4 +1,4 @@ STUDY,ARM,N,AGE_MEAN,AGE_MEDIAN,AGE_SD,SEX_MALE_COUNT,SEX_MALE_PROP,ECOG0_PROP,SMOKE_COUNT Study_XXXX,Total,300,51,49,3.25,146,0.49,0.49,58 Study_XXXX,Intervention,,,,,,,, -Study_XXXX,Comparator,,,,,,,, \ No newline at end of file +Study_XXXX,Comparator,,,,,,,, diff --git a/man/bucher.Rd b/man/bucher.Rd index df3f8b17..23ab391e 100644 --- a/man/bucher.Rd +++ b/man/bucher.Rd @@ -31,3 +31,8 @@ Given two estimated treatment effects of A vs. C and B vs. C derive the adjusted treatment of A vs. B using Bucher method, with two-sided confidence limits and Z-test p-value } +\examples{ +trt <- list(est = 1.1, se = 0.2) +com <- list(est = 1.3, se = 0.18) +bucher(trt, com, conf_lv = 0.9) +} diff --git a/man/center_ipd.Rd b/man/center_ipd.Rd index 0446773a..6ecf390d 100644 --- a/man/center_ipd.Rd +++ b/man/center_ipd.Rd @@ -9,7 +9,7 @@ center_ipd(ipd, agd) \arguments{ \item{ipd}{IPD variable names should match the aggregate data names without the suffix. This would involve either changing the aggregate data name or the ipd name. -For instance, if we binarize SEX variable with MALE as a reference, function names the new variable as SEX_MALE. +For instance, if we binarize SEX variable with MALE as a reference using \link{dummize_ipd}, function names the new variable as SEX_MALE. In this case, SEX_MALE should also be available in the aggregate data.} \item{agd}{pre-processed aggregate data which contain STUDY, ARM, and N. Variable names should be followed diff --git a/man/check_weights.Rd b/man/check_weights.Rd index 1848c67f..e16ac18e 100644 --- a/man/check_weights.Rd +++ b/man/check_weights.Rd @@ -5,7 +5,7 @@ \alias{print.maicplus_check_weights} \title{Check to see if weights are optimized correctly} \usage{ -check_weights(optimized, processed_agd) +check_weights(weighted_data, processed_agd) \method{print}{maicplus_check_weights}( x, @@ -17,7 +17,7 @@ check_weights(optimized, processed_agd) ) } \arguments{ -\item{optimized}{object returned after calculating weights using \code{\link{estimate_weights}}} +\item{weighted_data}{object returned after calculating weights using \code{\link{estimate_weights}}} \item{processed_agd}{a data frame, object returned after using \code{\link{process_agd}} or aggregated data following the same naming convention} @@ -35,7 +35,7 @@ aggregated data following the same naming convention} \item{...}{further arguments to \link{print.data.frame}} } \value{ -data.frame of weighted and unweighted covariate averages of the IPD +data.frame of weighted and unweighted covariate averages of the IPD, and average of aggregate data } \description{ This function checks to see if the optimization is done properly by checking the covariate averages @@ -91,9 +91,10 @@ match_res <- estimate_weights( ) check <- check_weights( - optimized = match_res, + weighted_data = match_res, processed_agd = target_pop ) print(check) + } diff --git a/man/estimate_weights.Rd b/man/estimate_weights.Rd index d3d1151c..d40060cf 100644 --- a/man/estimate_weights.Rd +++ b/man/estimate_weights.Rd @@ -38,7 +38,7 @@ modifiers} } } \description{ -Assuming data is properly processed, this function takes individual patient data (IPD) with centered covariates -(effect modifiers and/or prognostic variables) as input, and generates weights for each individual in IPD trial that -matches the chosen statistics of those covariates in Aggregated Data (AgD) trial. +This function takes individual patient data (IPD) with centered covariates +(effect modifiers and/or prognostic variables) as input and generates +weights for each individual in IPD trial to match the covariates in aggregate data. } diff --git a/man/ext_tte_transfer.Rd b/man/ext_tte_transfer.Rd index 588cc50d..8210753d 100644 --- a/man/ext_tte_transfer.Rd +++ b/man/ext_tte_transfer.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/process_data.R \name{ext_tte_transfer} \alias{ext_tte_transfer} -\title{helper function: transform TTE ADaM data to suitable input for survival R pkg} +\title{helper function: transform TTE ADaM data to suitable input for survival R package} \usage{ ext_tte_transfer(dd, time_scale = "month", trt = NULL) } @@ -17,5 +17,5 @@ ext_tte_transfer(dd, time_scale = "month", trt = NULL) a data frame that can be used as input to survival::Surv } \description{ -helper function: transform TTE ADaM data to suitable input for survival R pkg +helper function: transform TTE ADaM data to suitable input for survival R package } diff --git a/man/km_makeup.Rd b/man/km_plot.Rd similarity index 88% rename from man/km_makeup.Rd rename to man/km_plot.Rd index e218cc2c..c786013e 100644 --- a/man/km_makeup.Rd +++ b/man/km_plot.Rd @@ -1,10 +1,10 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/survival-helper.R -\name{km_makeup} -\alias{km_makeup} +\name{km_plot} +\alias{km_plot} \title{helper function: KM plot with unadjusted and adjusted KM} \usage{ -km_makeup( +km_plot( km_fit_before, km_fit_after = NULL, time_scale, @@ -22,7 +22,8 @@ km_makeup( \item{trt}{a character string, name of the interested treatment in internal trial (real IPD)} -\item{trt_ext}{character string, name of the interested comparator in external trial used to subset \code{dat_ext} (pseudo IPD)} +\item{trt_ext}{character string, name of the interested comparator in external trial used to +subset \code{dat_ext} (pseudo IPD)} \item{endpoint_name}{a character string, name of the endpoint} } diff --git a/man/maic_tte_unanchor.Rd b/man/maic_tte_unanchor.Rd index 1cdd650a..30360592 100644 --- a/man/maic_tte_unanchor.Rd +++ b/man/maic_tte_unanchor.Rd @@ -32,6 +32,9 @@ maic_tte_unanchor( \item{transform}{a character string, pass to \code{\link[survival]{cox.zph}}} } +\value{ +A list of KM plot, analysis table, and diagnostic plot +} \description{ Unanchored MAIC for time-to-event endpoint } diff --git a/man/maicplus-package.Rd b/man/maicplus-package.Rd new file mode 100644 index 00000000..5e91779e --- /dev/null +++ b/man/maicplus-package.Rd @@ -0,0 +1,23 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/maicplus-package.R +\docType{package} +\name{maicplus-package} +\alias{maicplus} +\alias{maicplus-package} +\title{maicplus: Matching Adjusted Indirect Comparison} +\description{ +The maicplus package facilitates performing matching adjusted indirect comparison (MAIC) analysis where the endpoint of interest is either time-to-event (e.g. overall survival) or binary (e.g. objective tumor response). +} +\seealso{ +Useful links: +\itemize{ + \item \url{https://github.com/hta-pharma/maicplus/} + \item Report bugs at \url{https://github.com/hta-pharma/maicplus/issues} +} + +} +\author{ +\strong{Maintainer}: hta-pharma \email{hta-pharma@example.com} + +} +\keyword{internal} diff --git a/man/medSurv_makeup.Rd b/man/medSurv_makeup.Rd index 77b7b894..68c0cb3d 100644 --- a/man/medSurv_makeup.Rd +++ b/man/medSurv_makeup.Rd @@ -17,5 +17,5 @@ medSurv_makeup(km_fit, legend = "before matching", time_scale) a data frame with a index column 'type', median survival time and confidence interval } \description{ -extract and display median survival time with confidence interval +Extract and display median survival time with confidence interval } diff --git a/man/process_agd.Rd b/man/process_agd.Rd index 7dc640c4..d14e13e9 100644 --- a/man/process_agd.Rd +++ b/man/process_agd.Rd @@ -25,7 +25,6 @@ sample size differs for each variable, one option is to specify proportion direc _PROP. } \examples{ -# example target_pop <- read.csv(system.file("extdata", "aggregate_data_example_1.csv", package = "maicplus", mustWork = TRUE )) @@ -40,18 +39,4 @@ target_pop <- process_agd(target_pop) target_pop2 <- process_agd(target_pop2) target_pop3 <- process_agd(target_pop3) -# another example -target_pop <- data.frame( - STUDY = "Study_XXXX", - ARM = "Total", - N = 300, - AGE_MEAN = 51, - AGE_MEDIAN = 49, - AGE_SD = 3.25, - SEX_MALE_COUNT = 147, - ECOG0_COUNT = 105, - SMOKE_PROP = 58 / 290 -) -process_agd(target_pop) - } diff --git a/man/survfit_makeup.Rd b/man/survfit_makeup.Rd index 6c5b3557..ed253440 100644 --- a/man/survfit_makeup.Rd +++ b/man/survfit_makeup.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/survival-helper.R \name{survfit_makeup} \alias{survfit_makeup} -\title{helper function: makeup \code{survival::survfit} object for km plot} +\title{Helper function to select a set of variables used for Kaplan-Meier plot} \usage{ survfit_makeup(km_fit) } @@ -10,8 +10,8 @@ survfit_makeup(km_fit) \item{km_fit}{returned object from \code{survival::survfit}} } \value{ -a list of data frames, one element per treatment +a list of data frames of variables from \code{survival::survfit}. Data frames are divided by treatment. } \description{ -helper function: makeup \code{survival::survfit} object for km plot +Helper function to select a set of variables used for Kaplan-Meier plot }