dynFacBAM#

Purpose#

Provide Bayesian estimates of the posterior distributions of a dynamic, two-factor model.

Format#

dynOut = dynFacBAM(data, dctl)#
Parameters:
  • data (Matrix) – (NumSubGroups*NumObs x (3+k)), a stacked matrix of observable data. It must include a data/observation indicator in the first column, a group indicator in the second column, and a sub-group indicator in the third column. Unstacked panel series data can be converted to an acceptable format using the createDynFacData() procedure.

  • dctl (struct) –

    An instance of a dynControl structure. For an instance of the dynControl structure named dctl the members are:

    dctl.n0

    Scalar, number of burn-in iterations.

    dctl.m

    Scalar, number of saved iterations.

    dctl.p

    Scalar, order of autoregression for observables.

    dctl.q

    Scalar, order of autoregression for factors.

    dctl.quantE

    Kx1 vector, quantiles to be counted and stored as part of the output. Quantiles should be specified in decimal form.

    dctl.printOut

    Scalar, indicator input set to one to print factor quantile tables to the command screen.

    dctl.graphOut

    Scalar, indicator input set to one to create factor quantile graphs to the command screen.

Returns:

dOut (struct) –

An instance of the dynOut structure. For an instance of the dynOut structure named dOut the members are:

dOut.facsave1

Matrix, Nobs x numIterations, stores draws of factor one, one column for each iteration.

dOut.facsavea

Array, NumFac2 x Nobs x numIterations, stores draws of second factors, stored on separate planes for each sub-group, with each iteration stored on separate columns.

dOut.facsaveb

Matrix, NumFac2 x Nobs, stores means of the draws of second factors with each factor stored on a separate column.

dOut.parms

Matrix, NumFac2 x Nobs, stores draws of the parameter vector, one column for each iteration.

dOut.vdecom2

Array, 3 x numObs x numVars, stores variance decomposition from group factor, sub-group factors, and idiosyncratic error terms, in separate planes respectively.

dOut.errTerms

Array, numVars x numInd x numObs x numIters, stores draws of error terms, stored on separate planes for each variable per each sub-group, with each iteration stored on separate columns.