make_mxfda function

Make mxFDA class object

Make mxFDA class object

Used to create an object of class mxFDA that can be used with the mxfda package for functional data analysis.

make_mxfda(metadata, spatial = NULL, subject_key, sample_key)

Arguments

  • metadata: metadata with columns subject_key and sample_key
  • spatial: spatial information, either list or df, with column sample_key. Spatial can be empty if inputting data already derived. See add_summary_function() for more details.
  • subject_key: column name in Metadata for subject ID
  • sample_key: column linking Metadata to Spatial data

Returns

S4 object of class mxFDA

  • Metadata: slot of class data.frame that contains sample and subject level information

  • Spatial: slot of class data.frame that contains point level information within samples. An example would be cells belonging to TMA cores

  • subject_key: slot of class character that corresponds to a column in the Metadata slot that groups samples at a subject level. An example would be "patient_id"

  • sample_key: slot of class character that corresponds to a column both in the Metadata and Spatial slots that links samples to characteristics

  • univariate_summaries: slot of class list where univariate summary functions calculated on Spatial would be stored

  • bivariate_summaries: slot of class list where bivariate summary functions calculated on Spatial would be stored

  • multiivariate_summaries: slot of class list where entropy summary functions calculated on Spatial would be stored

  • functional_pca: slot of class list where FPCA results are stored

  • functional_mpca: slot of class list where MFPCA results are stored

  • functional_cox: slot of class list where functional cox model results are stored

  • functional_mcox: slot of class list where mixed functional cox model results are stored

  • scalar_on_function: slot of class list where functional models are fit to scalar responses

Details

Examples

#select sample metadata clinical = lung_df %>% dplyr::select(image_id, patient_id, patientImage_id, gender, age, survival_days, survival_status, stage) %>% dplyr::distinct() #select the spatial information spatial = lung_df %>% dplyr::select(-image_id, -gender, -age, -survival_days, -survival_status, -stage) sample_id_column = "patientImage_id" #create the mxFDA object mxFDAobject = make_mxfda(metadata = clinical, spatial = spatial, subject_key = "patient_id", sample_key = sample_id_column)

Author(s)

Alex Soupir alex.soupir@moffitt.org