Am 06.10.2020 um 17:08 schrieb Riccardo (Jack) Lucchetti:
On Tue, 6 Oct 2020, Allin Cottrell wrote:
>>>> ### compute the reduced form VAR representation
>>>>
>>>> matrix A = $sysGamma\$sysA
>>>> matrix b = $sysGamma\$sysB
>>>
>>> This is super elegant and concise - is it also correct (combined with
>>> varsimul below)? I dimly remember that there was an issue with the
>>> ordering of the regressors that might be different from what varsimul
>>> expects.
>>
>> Oh, I wans't aware of that. Care to elaborate?
>
> I think Sven's point concerned (a) lagged terms arranged by variable
> vs (b) lagged terms arranged by lag.
I just checked. It seems to be ok: $sysA returns the uppermost block
of the companion matrix, which is what varsimul wants.
OK, very good. Maybe my confusion was about $vecGamma in VECMs instead.
(And of course $coeff is different after 'var' and 'system', as is duly
documented.)
But about $nobs and the trend construction again - I think it would be
more generally correct to use the following (semi-tested):
matrix SimExo = 1 ~ seq(time[$t2] + 1, time[$t2] + horizon)'
cheers
sven