how to do whitening transformation of adjusted r squared , sum of squared error and f statistic in matlab

To perform whitening transformation on the adjusted R-squared, sum of squared errors, and F-statistic in MATLAB, you can follow the steps below:

  1. Compute the residuals: Start by fitting your model and obtaining the residuals. If you have a model object, you can use the residuals() function to extract the residuals.

  2. Whitening transformation of Adjusted R-squared: The adjusted R-squared is a measure of how well the model fits the data, corrected for the number of predictors. To whiten the adjusted R-squared, you can use a transformation that scales it to have zero mean and unit variance. You can achieve this by subtracting the mean and dividing by the standard deviation:

main.m
adjusted_r2 = ... % your adjusted R-squared value
mean_adjusted_r2 = mean(adjusted_r2);
std_adjusted_r2 = std(adjusted_r2);
whitened_adjusted_r2 = (adjusted_r2 - mean_adjusted_r2) / std_adjusted_r2;
199 chars
5 lines
  1. Whitening transformation of Sum of Squared Errors: The sum of squared errors (SSE) is a measure of the goodness of fit of the model. To whiten the SSE, you can apply a similar transformation as for the adjusted R-squared. Calculate the mean and standard deviation of the SSE, and then perform the whitening transformation:
main.m
SSE = ... % your sum of squared errors
mean_SSE = mean(SSE);
std_SSE = std(SSE);
whitened_SSE = (SSE - mean_SSE) / std_SSE;
124 chars
5 lines
  1. Whitening transformation of F-statistic: The F-statistic is a ratio of two variances and is used to test the significance of the model. To whiten the F-statistic, you can apply the same transformation as for the adjusted R-squared and SSE:
main.m
F_statistic = ... % your F-statistic value
mean_F_statistic = mean(F_statistic);
std_F_statistic = std(F_statistic);
whitened_F_statistic = (F_statistic - mean_F_statistic) / std_F_statistic;
192 chars
5 lines

These steps will help you perform the whitening transformation on the adjusted R-squared, sum of squared errors, and F-statistic in MATLAB. Make sure you have calculated the respective statistics correctly before applying the whitening transformation.

related categories

gistlibby LogSnag