From Eigenvector Research Documentation Wiki
Jump to navigation Jump to search


Multiple Linear Regression for multivariate Y.


model = mlr(x,y,options)
pred = mlr(x,model,options)
valid = mlr(x,y,model,options)
mlr % Launches analysis window with MLR as the selected method.

Please note that the recommended way to build and apply a MLR model from the command line is to use the Model Object. Please see this wiki page on building and applying models using the Model Object.


MLR identifies models of the form Xb = y + e.


  • y = X-block: predictor block (2-way array or DataSet Object)
  • y = Y-block: predictor block (2-way array or DataSet Object)


  • model = scalar, estimate of filtered data.
  • pred = structure array with predictions
  • valid = structure array with predictions


options = a structure array with the following fields.

  • display: [ {'off'} | 'on'] Governs screen display to command line.
  • plots: [ 'none' | {'final'} ] governs level of plotting.
  • ridge: [ 0 ] ridge parameter to use in regularizing the inverse.
  • preprocessing: { [] [] } preprocessing structure (see PREPROCESS).
  • blockdetails: [ 'compact' | {'standard'} | 'all' ] level of detail (predictions, raw residuals, and calibration data) included in the model.
  • ‘Standard’ = the predictions and raw residuals for the X-block as well as the X-block itself are not stored in the model to reduce its size in memory. Specifically, these fields in the model object are left empty: 'model.pred{1}', 'model.detail.res{1}', '{1}'.
  • ‘Compact’ = for this function, 'compact' is identical to 'standard'.
  • 'All' = keep predictions, raw residuals for both X- & Y-blocks as well as the X- & Y-blocks themselves.

Studentized Residuals

From version 8.8 onwards, the Studentized Residuals shown for MLR Scores Plot are now calculated for calibration samples as:

 MSE   = sum((res).^2)./(m-1);
 syres = res./sqrt(MSE.*(1-L));

where res = y residual, m = number of samples, and L = sample leverage. This represents a constant multiplier change from how Studentized Residuals were previously calculated. For test datasets, where pres = predicted y residual, the semi-Studentized residuals are calculated as:

 MSE   = sum((res).^2)./(m-1);
 syres = pres./sqrt(MSE);

This represents a constant multiplier change from how the semi-Studentized Residuals were previously calculated.

See Also

analysis, crossval, ils_esterror, modelstruct, pcr, pls, preprocess, ridge, testrobustness, EVRIModel_Objects