fp: Helper to assign attributes to a variable undergoing...

View source: R/mfp2.R

fpR Documentation

Helper to assign attributes to a variable undergoing FP-transformation

Description

Used in formula interface to mfp2().

Usage

fp(
  x,
  df = 4,
  alpha = 0.05,
  select = 0.05,
  shift = NULL,
  scale = NULL,
  center = TRUE,
  acdx = FALSE,
  powers = NULL
)

fp2(...)

Arguments

x

a vector representing a continuous variable undergoing fp-transformation.

df, alpha, select, shift, scale, center, acdx

See mfp2()) for details.

powers

a vector of powers to be evaluated for x. Default is NULL and powers = c(-2, -1, -0.5, 0, 0.5, 1, 2, 3) will be used.

...

used in alias fp2 to pass arguments.

Value

The vector x with new attributes relevant for fp-transformation. All arguments passed to this function will be stored as attributes.

Functions

  • fp2(): Alias for fp() - use in formula when both mfp and mfp2 are loaded to avoid name shadowing.

Examples


xr = 1:10
fp(xr)
fp2(xr)

mfp2 documentation built on Nov. 15, 2023, 1:06 a.m.