nParams calculates the number of parameters
nParams(p, M, StMAR = FALSE, restricted = FALSE, constraints = FALSE, R)a positive integer specifying the order of AR coefficients.
a positive integer specifying the number of mixture components or regimes.
an (optional) logical argument stating whether StMAR model should be considered instead of GMAR model. Default is FALSE.
an (optional) logical argument stating whether the AR coefficients \(\phi_{m,1},...,\phi_{m,p}\) are restricted
to be the same for all regimes. Default is FALSE.
an (optional) logical argument stating whether general linear constraints should be applied to the model. Default is FALSE.
Specifies the linear constraints.
a list of size \((pxq_{m})\) constraint matrices \(R_{m}\) of full column rank satisfying \(\phi_{m}\)\(=\)\(R_{m}\psi_{m}\) for all \(m=1,...,M\), where \(\phi_{m}\)\(=(\phi_{m,1},...,\phi_{m,p})\) and \(\psi_{m}\)\(=(\psi_{m,1},...,\psi_{m,q_{m}})\).
a size \((pxq)\) constraint matrix \(R\) of full column rank satisfying \(\phi\)\(=\)\(R\psi\), where \(\phi\)\(=(\phi_{1},...,\phi_{p})\) and \(\psi\)\(=\psi_{1},...,\psi_{q}\).
Symbol \(\phi\) denotes an AR coefficient. Note that regardless of any constraints, the nominal order of AR coefficients is alway p for all regimes.
This argument is ignored if constraints==FALSE.
returns the number of parameters.