Skip to contents

Compares two isolate lookups by examining patients categorized as "convert". This is the internal implementation that works directly with isolate lookups.

Usage

fraction_convert_same_source_from_lookups(
  isolate_lookup1,
  isolate_lookup2,
  surv_df_1,
  surv_df_2
)

Arguments

isolate_lookup1

A data frame from get_isolate_lookup() for the first cluster assignment.

isolate_lookup2

A data frame from get_isolate_lookup() for the second cluster assignment.

surv_df_1

A data frame with surveillance data containing columns: patient_id, genome_id, surv_date, result for the first cluster assignment.

surv_df_2

A data frame with surveillance data containing columns: patient_id, genome_id, surv_date, result for the second cluster assignment.

Value

A numeric value between 0 and 1 representing the fraction of convert patients whose source (index or weak-index) is the same in both cluster assignments. Returns NA if there are no common converts.