generate_transformations_fp {mfp2}R Documentation

Function to generate all requested FP transformations for a single variable

Description

Function to generate all requested FP transformations for a single variable

Usage

generate_transformations_fp(x, degree, powers)

generate_transformations_acd(x, degree, powers)

Arguments

x

a numeric vector of length nobs assumed to have been shifted and scaled.

degree

numeric indicating the degree of FPs. Assumed to be 2 for acd transformation.

powers

a vector of allowed FP powers.

Details

Any FP transformation is given by a vector of powers, e.g. (p1, p2) for degree 2. These correspond to powers x^p1 and x^p2. Thus, we only need to consider combinations of all values in powers, since order of the entries does not matter. See generate_powers_fp(). A special case are repeated powers, i.e. p1 = p2. In this case, the repeated entries are multiplied by log(x) (see transform_vector_fp()).

When the ACD transformation is requested, then all pairs of length 2 are considered, i.e. 64. See generate_powers_acd().

If degree = 0 then these functions return the data unchanged for fp, or simply the acd transformation of the input variable, i.e. in both cases the power is set to 1 (linear).

Value

A list with two entries:

Functions


[Package mfp2 version 1.0.0 Index]