System Identification Toolbox
  Go to function:
    Search    Help Desk 
resid    Examples   See Also

Compute and test the residuals (prediction errors) of a model.

Syntax

[e,r] = resid(z,th)
[e,r] = resid(z,th,M,maxsize)
resid(r);

Description

Matrix z contains the output-input data z = [y u], where y and u are column vectors. In the multivariable case, y and u are matrices, with columns corresponding to the different inputs and outputs.

th is the model to be evaluated on the given data set, defined in theta format.

e is returned with the residuals (prediction errors) associated with the model and the data.

The autocorrelation function of e and the cross correlation between e and the input(s) u are computed and displayed. The 99% confidence intervals for these values are also computed and displayed as dotted (red) curves. The computation of these values is done assuming e to be white and independent of u. The functions are displayed up to lag M, which is 25 by default.

The correlation information is returned with r. The plots can then be reviewed by

See "Model Structure Selection and Validation" on page 3-49 in the User's Guide for more information.

The argument maxsize is explained under auxvar.

Examples

Here are some typical model validation commands:

See Also

auxvar, compare, pem, theta

References

Ljung (1987), Section 16.5.



[ Previous | Help Desk | Next ]