Used to create an object of class mxFDA that can be used with the mxfda package for functional data analysis.
Arguments
- metadata
metadata with columns
subject_keyandsample_key- spatial
spatial information, either list or df, with column
sample_key.Spatialcan be empty if inputting data already derived. Seeadd_summary_function()for more details.- subject_key
column name in
Metadatafor subject ID- sample_key
column linking
MetadatatoSpatialdata
Value
S4 object of class mxFDA
- Metadata
slot of class
data.framethat contains sample and subject level information- Spatial
slot of class
data.framethat contains point level information within samples. An example would be cells belonging to TMA cores- subject_key
slot of class
characterthat corresponds to a column in theMetadataslot that groups samples at a subject level. An example would be "patient_id"- sample_key
slot of class
characterthat corresponds to a column both in theMetadataandSpatialslots that links samples to characteristics- univariate_summaries
slot of class
listwhere univariate summary functions calculated onSpatialwould be stored- bivariate_summaries
slot of class
listwhere bivariate summary functions calculated onSpatialwould be stored- multiivariate_summaries
slot of class
listwhere entropy summary functions calculated onSpatialwould be stored- functional_pca
slot of class
listwhere FPCA results are stored- functional_mpca
slot of class
listwhere MFPCA results are stored- functional_cox
slot of class
listwhere functional cox model results are stored- functional_mcox
slot of class
listwhere mixed functional cox model results are stored- scalar_on_function
slot of class
listwhere functional models are fit to scalar responses
Author
Alex Soupir alex.soupir@moffitt.org
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)
