# Documentation

### This is machine translation

Translated by
Mouseover text to see original. Click the button below to return to the English verison of the page.

# vgxcount

(To be removed) Count VARMAX model parameters

`vgxcount` will be removed in a future release. Use `summarize` instead.

## Syntax

```NumParam = vgxcount(Spec)
[NumParam,NumActive] = vgxcount(Spec)
```

## Description

`vgxcount` counts the total and active parameters in a multivariate time series model.

The total number of parameters in a multivariate time series model includes all parameters in the conditional mean and conditional covariance models. If the innovations process has a full covariance, the total number of parameters is

`$n+nAR\cdot {n}^{2}+nMA\cdot {n}^{2}+nX+n\left(n+1\right)/2$`

where n is the number of time series, nAR is the number of autoregressive lag matrices, nMA is the number of moving average lag matrices, and nX is the number of exogenous parameters. If the innovations process has a diagonal covariance, the total number of parameters is

`$n+nAR\cdot {n}^{2}+nMA\cdot {n}^{2}+nX+n$`

If the model does not have a constant (if `Spec.Constant` is `false`), then the total is reduced by n.

### Note

The innovations covariance matrix is a symmetric matrix with at most n(n + 1)/2 unique elements.

## Input Arguments

 `Spec` A multivariate time series specification structure for an n-dimensional time series process, as created by `vgxset`.

## Output Arguments

 `NumParam` Total number of parameters in current model. `NumActive` Number of active (unrestricted) parameters in current model.

## Examples

collapse all

Start with a 2-dimensional VARMA(2, 2) specification structure in `Spec`:

`load Data_VARMA22`

Change the model to estimate only the diagonals of the AR matrices and count the total number of parameters in `NumParam` and the number of unrestricted parameters in `NumActive`:

`Spec = vgxset(Spec,'ARsolve',{logical(eye(2)),logical(eye(2))});`
```Warning: VGXSET will be removed in a future release. Use VARM model instead. ```
`[NumParam, NumActive] = vgxcount(Spec)`
```Warning: VGXCOUNT will be removed in a future release. Use SUMMARIZE function of VARM model instead. ```
```NumParam = 19 ```
```NumActive = 15 ```