%% Specify GJR Model with t Innovation Distribution
% This example shows how to specify a GJR model with a Student's t innovation distribution.
% Specify a GJR(1,1) model with a mean offset,
% y_t = \mu +\varepsilon_t,
% where \varepsilon_t = \sigma_t z_t and
% \sigma _t^2 = \kappa  + {\gamma _1}\sigma _{t - 1}^2 + {\alpha _1}\varepsilon _{t - 1}^2 + {\xi _1}I\left[ {{\varepsilon _{t - 1}} < 0} \right]\varepsilon _{t - 1}^2.
% Assume z_{t} follows a Student's t innovation distribution with 10 degrees of freedom.

tDist = struct('Name','t','DoF',10);
Mdl = gjr('Offset',NaN,'GARCHLags',1,'ARCHLags',1,...
              'LeverageLags',1,'Distribution',tDist)

% The value of Distribution is a struct array with field Name equal to 't' and field DoF equal to 10. When you specify the degrees of freedom, they aren't estimated if you input the model to estimate.
% Copyright 2015 The MathWorks, Inc.