# calc_overall_predicton_eta: Function to calculate overall prediction eta for the T method In okayaa/MT: Methods in Mahalanobis-Taguchi (MT) System

## Description

`calc_M_hat` calculates the overall prediction eta for the T method.

## Usage

 `1` ```calc_overall_predicton_eta(M, M_hat, subtracts_V_e = TRUE) ```

## Arguments

 `M` Vector with length n. The (true) value of the dependent variable after the data trasformation. `M_hat` Vector with length n. The estimated values of the dependent variable after the data trasformation. `subtracts_V_e` If `TRUE`, then the error variance is subtracted in the numerator when calculating `eta_hat`.

## Value

Numeric. Overall prediction eta which is used to measure the estimation accuracy.

`general_T` and `general_forecasting.T`
 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25``` ```# The value of the dependent variable of the following samples mediates # in the stackloss dataset. stackloss_center <- stackloss[c(9, 10, 11, 20, 21), ] # The following samples are data other than the unit space data and the test # data. stackloss_signal <- stackloss[-c(2, 9, 10, 11, 12, 19, 20, 21), ] # The following settings are same as the T1 method. model <- general_T(unit_space_data = stackloss_center, signal_space_data = stackloss_signal, generates_transform_functions = generates_transformation_functions_T1, subtracts_V_e = TRUE, includes_transformed_data = TRUE) modified_eta_hat <- model\$eta_hat modified_eta_hat <- 0 modified_M_hat <- calc_M_hat(model\$X, model\$beta_hat, modified_eta_hat) (modified_overall_predicton_eta <- calc_overall_predicton_eta(model\$M, modified_M_hat, subtracts_V_e = TRUE)) ```