This procedure converts the standard VAR residuals into the equivalent structural innovations.

Revised 27 March 2011 to add WEIGHTS and SIGMA options.

The syntax is:

@StructResids(options) u start end v

Parameters:

u = VECT[SERIES] of VAR residuals (input)

start end = range to convert

v = VECT[SERIES] of structural innovations (output)

The transformation from u's to v's can be specified in one of two ways: either a matrix F is provided using the FACTOR option that makes u=Fv or a matrix W is provided using the WEIGHTS option that makes Wu=v. If F isn't a full NxN matrix, then the covariance matrix of u is also needed to do compute the weight matrix which solves for v (the formula for the weight matrix is tr(F)*inv(SIGMA)). By default, that will be the standard %SIGMA matrix; if it's some other matrix, you can input it using the SIGMA option. The three forms are thus:

@StructResids(FACTOR=F) u start end v

@StructResids(WEIGHTS=W) u start end v

@StructResids(FACTOR=F,SIGMA=S) u start end v

where the first is used if F is a full N x N factor of the covariance matrix, the second is used if you have a P x N matrix of weights to construct the structural residuals from the VAR residuals, and the last is used if F is an N x P part of a factorization.