FORCEDFACTOR Procedure |
@ForcedFactor computes a factorization of an input N×N covariance matrix SIGMA which controls either
a.a column or block of columns in the factorization itself
b.a row or block of rows in the inverse of the factorization
This allows you to either force an orthogonalized component to hit the variables in a specific pattern (done by setting a column of the factorization), or to force that an orthogonalized component be formed from a particular linear combination of innovations (forces a row in the inverse). You set the one component, and @ForcedFactor builds a factorization around it. With multiple input components, you can force the factorization to include linear combinations of your inputs.
@ForcedFactor( options ) sigma a f
Parameters
|
sigma |
(input) SYMMETRIC covariance matrix |
|
a |
(input) RECTANGULAR (or VECTOR) - one dimension should be the same as sigma |
|
f |
(output) RECTANGULAR factor of sigma |
Options
FORCE=[ROW]/COLUMN
Indicates whether a scale of "a" is to be a row in the inverse or a column in the factorization itself.
Description
In the case (a), you provide an N×R matrix A. An R×R matrix PI is computed so that PI is upper triangular and A x PI makes up the first R columns in a matrix F that factors SIGMA (that is FF'=SIGMA). In particular, if R=1, then the first column of F is a scale multiple of A. Because of the structure of PI, if R>1, the first column of F is a scale multiple of the first column in A, the second column in F will be a linear combination of the first two columns of A, etc.
In the case (b), you provide an R×N matrix A. An R×R matrix PI is computed so that PI is lower triangular and PI x A makes up the first R rows of the inverse of a matrix F that factors SIGMA. In particular, if R=1, the first row in F**-1 is a scale multiple of A.
@ForcedFactor can also be helpful in determining the space which is orthogonal to a set of columns. If the matrix A is N×R, then after
@ForcedFactor(force=columns) sigma a f
the rightmost N×(N-R) submatrix of F spans the space of all possible columns in a factor of sigma that are orthogonal to the columns in A. (You can extract the desired submatrix using %XSUBMAT).
Examples
*
* To isolate the balanced growth shock
*
compute atilde=||1.0|1.0|1.0||
*
impulse(model=bootvecm,factor=%identity(3),results=baseimp,noprint,steps=500)
compute lrsum=%xt(baseimp,500)
*
compute d=inv(%innerxx(atilde))*tr(atilde)*lrsum
@forcedfactor(force=row) %sigma d f
This finds a factor which loads equally long-run on each of the three variables in a VAR. In this case, the long run responses are generated by taking the 500th element of the impulse response on an integrated system.
*
* Draw from space of impulse vectors orthogonal to i1 and i2
*
compute forcedcols=i1~i2
@forcedfactor(force=column) sigmad forcedcols ffactor
compute r3r=inv(sigmap)*%xsubmat(ffactor,1,nvar,%cols(forcedcols)+1,nvar)
compute [vector] v3r=r3r*%ransphere(%cols(r3r))
This uses @FORCEDFACTOR to generate a factor with the first two columns spanned by i1 and i2, and the remainder orthogonal to those columns. The orthogonal complement matrix is extracted using %XSUBMAT and a random "impulse vector" is extracted using it.
Copyright © 2025 Thomas A. Doan