order_variables {mfp2}R Documentation

Helper to order variables for mfp2 algorithm

Description

To be used in fit_mfp().

Usage

order_variables(xorder = "ascending", x = NULL, ...)

order_variables_by_significance(
  xorder,
  x,
  y,
  family,
  weights,
  offset,
  strata,
  method,
  control,
  nocenter
)

Arguments

xorder

a string determining the order of entry of the covariates into the model-selection algorithm. The default is ascending, which enters them by ascending p-values, or decreasing order of significance in a multiple regression (i.e. most significant first). descending places them in reverse significance order, whereas original respects the original order in x.

x

a design matrix of dimension n * p where n is the number of observations and p the number of predictors including intercept for glms, or excluding intercept for Cox models.

...

passed to order_variables_by_significance.

y

a vector of responses for glms, or a Surv object generated using the survival::Surv() function for Cox models.

family

a character string naming a family function supported by glm() or "cox" for Cox models.

weights, offset

parameters for both glm and Cox models, see either stats::glm() or survival::coxph() depending on family.

strata, method, control, nocenter

Cox model specific parameters, see survival::coxph().

Value

A vector of the variable names in x, ordered according to xorder.

Functions


[Package mfp2 version 1.0.0 Index]