KMSubtractionMatch: Match patients between subgroup and an overall cohorts.

Description Usage Arguments Examples

View source: R/KMSubtractionMatch.R

Description

This function conducts matching of patients between subgroup and an overall cohort.

Usage

1
KMSubtractionMatch(df_overall, df_subgroup, matching = "bipartite")

Arguments

df_overall

Dataframe of the overall cohort containing time-to-event data. Prepared with columns "time" and "status".

df_subgroup

Dataframe of the subgroup cohort containing time-to-event data. Prepared with columns "time" and "status".

matching

Choice of matching algorithm. The default matching algorithm is the minimum cost bipartite matching with the Hungarian algorithm ("bipartite"), users may choose to use Mahalanobis distance matching ("maha") or nearest neighbor matching with distances determined by logistic regression ("logit").

Examples

1
2
3
4
data(cancer)
df_overall=colon
df_subgroup=colon[1:200,]
KMSubtractionMatch(df_overall, df_subgroup, matching="bipartite")

josephjzhao/KMSubtraction documentation built on Jan. 25, 2022, 6:35 p.m.