select_ra2_acd {mfp2}R Documentation

Function selection procedure for ACD based on closed testing procedure

Description

Used in find_best_fp_step() when criterion = "pvalue" and an ACD transformation is requested for xi. For parameter explanations, see find_best_fp_step(). All parameters captured by ... are passed on to fit_model().

Usage

select_ra2_acd(
  x,
  xi,
  keep,
  degree,
  acdx,
  y,
  powers_current,
  powers,
  criterion,
  ftest,
  select,
  alpha,
  ...
)

Arguments

x

an input matrix of dimensions nobs x nvars. Does not contain intercept, but columns are already expanded into dummy variables as necessary. Data are assumed to be shifted and scaled.

xi

a character string indicating the name of the current variable of interest, for which the best fractional polynomial transformation is to be estimated in the current step.

keep

a character vector with names of variables to be kept in the model.

degree

integer > 0 giving the degree for the FP transformation.

acdx

a logical vector of length nvars indicating continuous variables to undergo the approximate cumulative distribution (ACD) transformation.

y

a vector for the response variable or a Surv object.

powers_current

a list of length equal to the number of variables, indicating the fp powers to be used in the current step for all variables (except xi).

powers

a named list of numeric values that sets the permitted FP powers for each covariate.

criterion

a character string defining the criterion used to select variables and FP models of different degrees.

ftest

a logical indicating the use of the F-test for Gaussian models.

select

a numeric value indicating the significance level for backward elimination of xi.

alpha

a numeric value indicating the significance level for tests between FP models of different degrees for xi.

...

passed to fitting functions.

Details

This function extends the algorithm used in select_ra2() to allow the usage of ACD transformations. The implementation follows the description in Royston and Sauerbrei (2016). The procedure is outlined in detail in the corresponding section in the documentation of mfp2().

When a variable is forced into the model by including it in keep, then this function will not exclude it from the model (by setting its power to NA), but will only choose its functional form.

Value

A list with several components:

References

Royston, P. and Sauerbrei, W., 2016. mfpa: Extension of mfp using the ACD covariate transformation for enhanced parametric multivariable modeling. The Stata Journal, 16(1), pp.72-87.

See Also

select_ra2()


[Package mfp2 version 1.0.0 Index]