|
[ Home | GAUSS | GAUSS Engine | GAUSS Apps | 3rd Party Apps | Keywords Index ] setCVIndEqs setIndEqs
library fanpac;
session amzn 'inCV model';
setDataSet stocks;
setSeries AMZN;
setIndVars AMZNvol;
setIndEqs none;
setCVIndEqs AMZNvol;
estimate run2 garchv(1,1);
causes FANPAC to include amzn1 as an independent variable in the conditional variance equation for run2. The call to setIndEqs with argument "none" removes AMZNvol from the mean equation.
For multivariate models, setCVIndEqs sets lists of independent variables for each conditional variance. The call to setCVIndEqs causes a FANPAC global _fan_CVIndEquations to be created. This global is a matrix with rows equal to the number of conditional variances and covariances in the model and columns equal to the number of independent variables declared in the call to setIndVars. The elements are zeros and ones, where ones indicate a coefficient to be estimated. To declare different sets of independent variables for different dependent variables in the multivariate model, the dependent variable name is included as the first argument in the call to setCVIndEqs. For example,
library fanpac;
session mult 'multivariate example';
setDataSet stocks;
setSeries msft cpwr;
setIndVars msftVol AMZNvol;
setIndEqs none;
setCVIndEqs amzn AMZNvol;
setCVIndEqs msft MSFTvol;
estimate run1 dvgarchv(1,1);
For this model there will be two conditional variances and one conditional covariance. Thus _fan_CVIndEquations will have three rows. There are two independent variables, and one of them, AMZNvol, is specified above to be in the AMZN conditional variance equation but not in the MSFT conditional variance equation. Correspondingly, MSFTvol is in the MSFT conditional variance equation but not the AMZN conditional variance equation. However, any independent variable specified to be in a conditional variance equation is also specified automatically to be in any conditional covariance equations that it is associated with. Thus in the above case, there will be coefficients computed for both AMZNvol and MSFTvol in the conditional covariance equation. The matrix in _fan_CVIndEquations will look like this
print _fan_CVIndEquations;
1 0
1 1
0 1
This will not be an issue in constant correlation models, however. Thus for
library fanpac;
session mult 'multivariate example';
setDataSet stocks;
setSeries msft cpwr;
setIndVars msftVol AMZNvol;
setIndEqs none;
setCVIndEqs amzn AMZNvol;
setCVIndEqs msft MSFTvol;
estimate run1 cdvgarchv(1,1);
we have
print _fan_CVIndEquations;
1 0
0 1
|