Learn R Programming

mxfda (version 0.2.2-1)

process_fcm: process_fcm

Description

Internal function called by run_fcm that transforms long format functional data for use in a linear or additive functional Cox model.

Usage

process_fcm(
  mxfundata,
  id,
  r = "r",
  value = "fundiff",
  analysis_vars,
  quantile_transform = FALSE,
  multilevel = FALSE
)

Value

A dataframe with matrix-valued covariates l_int, t_int, and func for use in a linear or additive functional Cox model.

Arguments

mxfundata

Dataframe of spatial summary functions from multiplex imaging data, in long format. Can be estimated using the function extract_summary_functions or provided separately.

id

Character string, the name of the variable that identifies each unique subject.

r

Character string, the name of the variable that identifies the function domain (usually a radius for spatial summary functions). Default is "r".

value

Character string, the name of the variable that identifies the spatial summary function values. Default is "fundiff".

analysis_vars

Optional list of variables to be retained for downstream analysis.

quantile_transform

If TRUE, a quantile transformation is applied to the functional predictor before modeling

Author

Julia Wrobel julia.wrobel@emory.edu

Alex Soupir alex.soupir@moffitt.org

Examples

Run this code
# simulate data
set.seed(1001)

Run the code above in your browser using DataLab