Learn R Programming

mfp2 (version 1.0.0)

get_selected_variable_names: Helper function to extract selected variables from fitted mfp2 object

Description

Simply extracts all variables for which not all powers are estimated to be NA. The names refer to the original names in the dataset and do not include transformations.

Usage

get_selected_variable_names(object)

Value

Character vector of names, ordered as defined by xorder in mfp2().

Arguments

object

fitted mfp2 object.

Examples

Run this code

# Gaussian model
data("prostate")
x = as.matrix(prostate[,2:8])
y = as.numeric(prostate$lpsa)
# default interface
fit = mfp2(x, y, verbose = FALSE)
get_selected_variable_names(fit)

Run the code above in your browser using DataLab