Outp = run(Q,Inp,Range,...)
Q
[ char ] - Reporting equations (rpteq) object.
Inp
[ struct ] - Input database that will be used to evaluate the reporting equations.
Dates
[ numeric ] - Dates at which the reporting equations will be evaluated; Dates
does not need to be a continuous date range.
Outp
[ struct ] - Output database with reporting variables.'dbOverlay='
[ true
| false
| struct ] - If true
, the LHS output data will be combined with data from the input database (or a user-supplied database).
'fresh='
[ true
| false
] - If true
, only LHS variables will be included in the output database, Outp
; if false
the output database will also include all entries from the input database, Inp
.
Reporting equations are always evaluated non-simultaneously, i.e. equation by equation, for each period.
Note the differences in the three output databases, d1
, d2
, d3
, depending on the options 'dbOverlay='
and 'fresh='
.
>> q = rpteq({ ...
'a = c * a{-1}^0.8 * b{-1}^0.2;', ...
'b = sqrt(b{-1});', ...
})
q =
rpteq object
number of equations: [2]
comment: ''
user data: empty
export files: [0]
>> d = struct();
>> d.a = tseries();
>> d.b = tseries();
>> d.a(qq(2009,4)) = 0.76;
>> d.b(qq(2009,4)) = 0.88;
>> d.c = 10;
>> d
d =
a: [1x1 tseries]
b: [1x1 tseries]
c: 10
>> d1 = run(q,d,qq(2010,1):qq(2011,4))
d1 =
a: [8x1 tseries]
b: [8x1 tseries]
c: 10
>> d2 = run(q,d,qq(2010,1):qq(2011,4),'dbOverlay=',true)
d2 =
a: [9x1 tseries]
b: [9x1 tseries]
c: 10
>> d3 = run(q,d,qq(2010,1):qq(2011,4),'fresh=',true)
d3 =
a: [8x1 tseries]
b: [8x1 tseries]