generates_transformation_functions_T1: Function to generate data transformation functions for the T1...

Description Usage Arguments Value See Also Examples

View source: R/generates_transformation_functions.R

Description

generates_transformation_functions_T1 is the argument for the parameter generates_transform_functions in genera_T, which is used in the T1 method. In addtion, the Ta method also uses this function for the argument.

Usage

1

Arguments

unit_space_data

Matrix with n rows (samples) and (p + 1) columns (variables). Data to generate the unit space. All data should be continuous values and should not have missing values.

Value

generates_transformation_functions_T1 returns a list containing three functions. For the first component, the data transformation function for independent variables is a function that subtracts the mean of each independent variable. For the second component, the data transformation function for a dependent variable is a function that subtracts the mean of a dependent variable. For the third component, the inverse function of the data transformation function for a dependent variable is a function that adds the mean of a dependent variable. The mean used is the mean of the unit_space_data.

See Also

T1 and Ta

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# The value of the dependent variable of the following samples mediates
# in the stackloss dataset.
stackloss_center <- stackloss[c(9, 10, 11, 20, 21), ]

tmp <- generates_transformation_functions_T1(stackloss_center)
mean_subtraction_function <- tmp[[1]]
subtracts_M_0 <- tmp[[2]]
adds_M_0 <- tmp[[3]]

is.function(mean_subtraction_function) # TRUE
is.function(subtracts_M_0) # TRUE
is.function(adds_M_0) # TRUE

okayaa/MT documentation built on March 15, 2021, 8:41 a.m.