transform_data_step | R Documentation |
Function to extract and transform adjustment variables
transform_data_step(x, xi, powers_current, df, powers, acdx)
x |
a matrix of predictors that includes the variable of interest |
xi |
name of the continuous predictor for which the FP function will be
estimated. There are no binary or two-level variables allowed. All variables
except |
powers_current |
a named list of FP powers of all variables of interest,
including |
df |
a numeric vector of degrees of freedom for |
powers |
a set of allowed FP powers. |
acdx |
a logical vector indicating the use of acd transformation. |
After extracting the adjustment variables this function, using their
corresponding FP powers stored in powers_current
, transforms them.
This is necessary When evaluating x of interest, as we must account for other
variables, which can be transformed or untransformed, depending on the
individual powers. It's worth noting that some powers can be NA, indicating
that the variable has been left out of the adjustment variables. It also
returns the FP data, which is dependent on the degrees of freedom. For example,
df = 2
is equivalent to FP degree one, resulting in the generation of 8
variables. If acdx
for the current variables of interest is set to TRUE
,
however, 64 variables are generated.
When df = 1
, this function returns data unchanged, i.e. a "linear"
transformation with power equal to 1. In case acdx[xi] = TRUE
, the
acd transformation is applied.
A list containing the following elements:
powers_fp
: fp powers used for data_fp
.
data_fp
: a list with all possible fp transformations for xi
, see the
data
component of the output of generate_transformations_fp()
and
generate_transformations_acd()
.
powers_adj
: fp powers for adjustment variables in data_adj
.
data_adj
: adjustment data, i.e. transformed input data for adjustment
variables.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.