Learn R Programming

mxfda (version 0.2.2-1)

extract_model: Extract Model

Description

Currently only extracts functional cox models not mixed functional cox models.

Usage

extract_model(mxFDAobject, metric, type, model_name)

Value

fit functional model

Arguments

mxFDAobject

object of class mxFDA

metric

metric functional PCA data to extract, e.g. 'uni k'

type

one of "cox", "mcox", or "sofr" to specify the type of model to extract

model_name

character string of the model name to retrieve

Author

Alex Soupir alex.soupir@moffitt.org

Details

[Stable]

Examples

Run this code
#load ovarian mxFDA object
data('ovarian_FDA')

#run the lfcm model
ovarian_FDA = run_fcm(ovarian_FDA, model_name = "fit_lfcm",
                      formula = survival_time ~ age, event = "event",
                      metric = "uni g", r = "r", value = "fundiff",
                      analysis_vars = c("age", "survival_time"),
                      afcm = FALSE)

#extract model
mod = extract_model(ovarian_FDA, 'uni g', 'cox', 'fit_lfcm')

Run the code above in your browser using DataLab