Skip to contents

Curate three datasetes for phylogenetically aware regression.

Usage

phyloaware_dataset_curation(
  trait,
  df,
  first_present = FALSE,
  patient_id = NULL,
  culture_date = NULL
)

Arguments

trait

Outcome of interest. Character string.

df

Dataset with trait variable and asr_cluster. Must contain patient_id and culture_date variables if first_present == TRUE.

first_present

Boolean (i.e., TRUE/FALSE) indicating whether to take the first present isolate

patient_id

Variable that contains IDs that group tips (i.e., Patient ID). Character string.

culture_date

Variable that contains collection/culture date. Character string. Variable must be formatted as a date.

Value

Three datasets labeled as 'present', 'singleton', and 'cluster'.

Details

Datasets included: 1. Present: All isolates 2. Singleton: Singleton isolates-only 3. Cluster: Cluster isolates-only

This permits isolated analysis of singleton and cluster isolates, enabling identification of characteristics associated with the emergence and/or spread of a trait.