DYNAMICLINEAR Procedure
Data Table Input
- INDISCOUNTFACTOR= Data Table in the DISCOUNTFACTOR Statement
- INCOVARIANCE= Data Table in the INITIALDISTRIBUTION Statement
- INCOVARIANCE(DIAGONAL)= Data Table in the INITIALDISTRIBUTION Statement
- INGAMMA= Data Table in the INITIALDISTRIBUTION Statement
- INMEAN= Data Table in the INITIALDISTRIBUTION Statement
PROC DYNAMICLINEAR takes multiple input data tables. All input data tables are listed in Table 1. The following sections provide an example of each table.
INDISCOUNTFACTOR= Data Table in the DISCOUNTFACTOR Statement
The input data table should be row-oriented, adhering to the following format specifications:
-
The identifiers
FactorIDfor discount factors are outlined in the following table:Factor Name Factor ID beta1 deltaphi2 deltagamma3 You must include the IDs of discount factors, labeled as
FactorID, in the data table.In the input of the TABLE= option, the number 0 can serve as a placeholder for any variables for which you choose not to assign specific values. This placeholder is ignored by the program, preserving the previously specified values from the DEFAULT= option or from the lists in the POSITIONS= and VALUES= options.
The following code demonstrates how to set the discount factors for a subset of variables—namely, y1, y2, y3, and y5—within your model for the BETA= and DELTAGAMMA= options:
data mylib.init_discfactors;
input factorid y1 y2 y3 y5;
datalines;
1 0.91 0.92 0.93 0.94
3 0.85 0.86 0.87 0.89
;
INCOVARIANCE= Data Table in the INITIALDISTRIBUTION Statement
When you specify the INCOVARIANCE= option, use the following format requirements:
An index column labeled
RowIDmust be included in the INCOVARIANCE= data table. This column is essential for sorting the entries in the correct order, ensuring the proper structure of the covariance matrix.The table should be free of redundant columns. Because all columns in the table are processed, extraneous columns could introduce errors or distort the intended covariance specifications.
The table must not have any missing values. In the context of a covariance matrix, missing entries are not permissible, because they could imply undefined relationships between variables. If gaps are present, they must be filled with zeros. However, care should be taken, because zero entries in a covariance matrix suggest no correlation, which might not always be the intended implication. Therefore, filling with zeros should be done with consideration of the matrix’s interpretive context.
INCOVARIANCE(DIAGONAL)= Data Table in the INITIALDISTRIBUTION Statement
Here is example input for the diagonal covariance input. Including varname and parmname in the table is optional, because they primarily serve to make the table easier to understand.
data mylib.init_diag;
input varname $1-4 varid parmname $24-40 parmid parmvalue;
datalines;
y1 1 Const 1 0.008596271
y1 1 ParSet_1 2 0.041964947
y1 1 ParSet_2 3 0.367778311
y2 2 Const 1 0.004223895
y2 2 ParSet_1 2 0.002395241
y2 2 ParSet_2 3 0.022385176
y3 3 Const 1 0.003904836
y3 3 ParSet_1 2 0.047429031
y3 3 ParSet_2 3 0.489922549
y4 4 Const 1 0.05762658
y4 4 ParSet_1 2 0.075128833
y4 4 ParSet_2 3 0.22400379
y5 5 Const 1 0.104497114
y5 5 ParSet_1 2 2.129695978
y5 5 ParSet_2 3 0.047091226
;
INGAMMA= Data Table in the INITIALDISTRIBUTION Statement
The input data table should use a row-oriented format. The specifications for the gamma distribution factors are as follows:
-
Assign
FactorIDto the gamma distribution parameters as outlined in the following table:Factor Name Factor ID rate2 shape1 You must include the
FactorIDcolumn in the data table to reference these parameters.In the input of the GAMMA= option, the number 0 can be used as a placeholder for any variables for which values are not being specified. This placeholder is ignored by the program, and the program uses existing values that you specify in the DEFAULT= option or in the lists in the POSITIONS= and VALUES= options.
Here is an example of the input gamma. The following code specifies the shape parameter for y1 as 2, y2 as 5, y5 as 8, and the rate parameter for y3 as 4, respectively:
data mylib.init_gamma;
input factorid y1 y2 y3 y5;
datalines;
1 2 5 0 8
2 0 0 4 0
;
INMEAN= Data Table in the INITIALDISTRIBUTION Statement
To correctly format the input data table of the INMEAN= option, use the following requirements:
The table must include three specific columns:
VarID,ParmID, andParmValue.VarIDvalues should correspond to the order of the variables as they appear in the MODEL statement.-
ParmIDvalues represent distinct parameters that are associated with the means of state variables within the initial normal-gamma distribution framework:A
ParmIDvalue of 1 designates the constant level (intercept) for the state variable’s mean.Subsequent integers (2, 3, and so on) in
ParmIDrelate to the sequential elements of the variable’s parental set, in the order in which they are defined.
ParmValuevalues represent the actual values of the means for the state variables.