%% Prepare VEC Model Template for Parameter Estimation
% Suppose that a VEC model with cointegrating rank of 4 and a short-run polynomial of degree 2 is appropriate for modeling the behavior of seven hypothetical macroeconometric time series.
% Create a VEC(7,4,2) model using the shorthand syntax.

Mdl = vecm(7,4,2)

% Mdl is a vecm model object that serves as a template for parameter estimation. MATLAB® considers the NaN values as unknown parameter values to be estimated. For example, the Adjustment property is a 7-by-4 matrix of NaN values. Therefore, the adjustment speeds are active model parameters to be estimated.
%
% By default, MATLAB® includes overall and cointegrating linear time trend terms in the model. You can create a VEC model in H1 Johansen form by removing the time trend terms, that is, by setting the Trend property to 0 using dot notation.

Mdl.Trend = 0

% MATLAB® expands Trend to the appropriate length, a 7-by-1 vector of zeros.
% Copyright 2012 The MathWorks, Inc.