Documentation 
[V,Y] =
filter(model,Z)
[V,Y] =
filter(model,Z,Name,Value)
[V,Y] = filter(model,Z) filters disturbances, Z, to produce conditional variances and responses of a univariate GJR(P,Q) model.
[V,Y] = filter(model,Z,Name,Value) filters disturbances using additional options specified by one or more Name,Value pair arguments.
model 
GJR model object, as created by gjr or estimate. The input model object cannot have any NaN values. 
Z 
numObsbynumPaths matrix of disturbances, z_{t}, used to drive the innovation process, ε_{t}. For a variance process $${\sigma}_{t}^{2},$$ the innovation process is given by $${\epsilon}_{t}={\sigma}_{t}{z}_{t}.$$ As a column vector, Z represents a single path of the underlying disturbance series. As a matrix, Z represents numObs observations of numPaths paths of the underlying disturbance series. filter assumes that observations across any row occur simultaneously. The last row contains the most recent observation. 
Specify optional commaseparated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside single quotes (' '). You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.
'Z0' 
Presample disturbances, providing initial values for the input disturbance series, Z. If Z0 is a column vector, then filter applies it to each output path. If Z0 is a matrix, then it must have at least numPaths columns. If the number of columns exceeds numPaths, then filter uses only the first numPaths columns. Z0 must have at least model.Q rows to initialize the conditional variance model. If the number of rows in Z0 exceeds model.Q, then filter uses only the most recent observations. The last row contains the most recent observation. Default: Necessary presample observations are set equal to an independent sequence of standardized disturbances drawn from the distribution in model. 
'V0' 
Positive presample conditional variances, providing initial values for the model. If V0 is a column vector, then filter applies it to each output path. If V0 is a matrix, then it must have at least numPaths columns. If the number of columns exceeds numPaths, then filter uses only the first numPaths columns. V0 must have at least max(model.P,model.Q)rows to initialize the variance equation. If the number of rows in V0 exceeds the number necessary, then filter uses only the most recent observations. The last row contains the most recent observation. Default: Necessary presample observations are set equal to the unconditional variance of the process. 
Notes

V 
numObsbynumPaths matrix of conditional variances of the meanzero, heteroscedastic innovations associated with Y. 
Y 
numObsbynumPaths time series matrix of response data. Y usually represents a meanzero, heteroscedastic time series of innovations with conditional variances given in V. Y might also represent a time series of meanzero, heteroscedastic innovations plus an offset. The inclusion of an offset is signaled by a nonzero Offset value in the input model. If the input model includes an offset, filter adds the offset to the underlying meanzero, heteroscedastic innovations so that Y represents a time series of offsetadjusted innovations. 
[1] Bollerslev, T. "Generalized Autoregressive Conditional Heteroskedasticity." Journal of Econometrics. Vol. 31, 1986, pp. 307–327.
[2] Bollerslev, T. "A Conditionally Heteroskedastic Time Series Model for Speculative Prices and Rates of Return." The Review of Economics and Statistics. Vol. 69, 1987, pp. 542–547.
[3] Box, G. E. P., G. M. Jenkins, and G. C. Reinsel. Time Series Analysis: Forecasting and Control. 3rd ed. Englewood Cliffs, NJ: Prentice Hall, 1994.
[4] Enders, W. Applied Econometric Time Series. Hoboken, NJ: John Wiley & Sons, 1995.
[5] Engle, R. F. "Autoregressive Conditional Heteroskedasticity with Estimates of the Variance of United Kingdom Inflation." Econometrica. Vol. 50, 1982, pp. 987–1007.
[6] Glosten, L. R., R. Jagannathan, and D. E. Runkle. "On the Relation between the Expected Value and the Volatility of the Nominal Excess Return on Stocks." The Journal of Finance. Vol. 48, No. 5, 1993, pp. 1779–1801.
[7] Hamilton, J. D. Time Series Analysis. Princeton, NJ: Princeton University Press, 1994.
filter generalizes simulate. That is, both filter a series of disturbances to produce output responses, innovations, and conditional variances. However, simulate autogenerates a series of meanzero, unitvariance, independent and identically distributed (iid) disturbances according to the distribution in the model object, model. In contrast, filter lets you directly specify your own disturbances.