| get_selected_variable_names | R Documentation |
mfp2 ModelReturns the names of predictors retained in the final model after MFP
selection, as recorded in the selected column of object$fp_terms.
Usually a selected variable has at least one fractional-polynomial power
that is not NA. The exception is a spike-at-zero term for which only
the binary indicator for x = 0 is retained: it is selected although
all of its powers are NA. Factors are reported by their variable name,
not by their contrast columns.
get_selected_variable_names(object)
object |
A fitted |
Character vector of selected predictor names, ordered according to the
xorder used in the mfp2() call.
mfp2(), print.mfp2()
# Gaussian model
data("prostate")
x <- as.matrix(prostate[, 2:8])
y <- as.numeric(prostate$lpsa)
fit <- mfp2(x, y, verbose = FALSE)
get_selected_variable_names(fit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.