Refactoring initval_file and histval_file
initval_file
and histvfal_file
should be more flexible and have functionalities similar to option datafile
in estimation
Usage
initval_file
- is used only in perfect foresight
- provides a guess value for computing the solution
- in absence of
histval
orhistval_file
provides the initial conditions for the simulation (we don't want to require users to upload two files for initial conditions and guess values
histval_file
- is used for stochastic and perfect foresight models
- provides initial conditions
Current implementation
initval_file
- accept
.m
,.mat
,.xls(x)
,.csv
files - modifies directly
oo_.endo_simul
,oo_.exo_simul
, but notoo_.exo_det_simul
histval_file
- accept only files prepared by
smoother2histval
that uses odd format - modifies directly
oo_.endo_simul
,oo_.exo_simul
, but notoo_.exo_det_simul
- note that
histval
sets adseries
object
Proposal
- have the same interface for
initval_file
andhistval_file
- add an option
dseries
to be able to pass adseries
object - handle references to
varexo_det
variables - use the
dseries
interface to read files -
initval_file
andhistval_file```set
dseries`` object - modify
make_y_
make_ex_
accordingly - handle auxiliary variables in a consistent manner (see #1004 (closed))
Breaking changes
- Documented behavior of
initval_file
: None - Documented behavior of
histval_file
: None - Documented behavior of
perfect_foresight_setup
: the format of files designated in optionfilename
has changed - Function
initvalf.m
-
M_
andoptions
are added to inputs - the old
filename
input triggers an error - function
initvalf()
sets a resultdseries
on output
-
- Function
histvalf.m
-
M_
andoptions
are added to inputs - the old
filename
input triggers an error - function
histvalf()
sets a resultdseries
on output -
histvalf.m
doesn't recognize the oldsmoother2histval
file format anymore.
-
- Function
smoother2histval.m
- when an output file is requested
smoother2histval()
creates a.mat
file containing a singledseries
-
smoother2histval.m
saves now M_.orig_maximum_lagobservations instead of
oo_.maximum_lag`` in order to be able to recompute auxiliary variables - It will not be possible to use a file saved with an previous version of
smoother2histval
- when an output file is requested
Questions
- Is it a problem to have an optional
dseries
input in an instruction calledinitval_file
and no file strictly speaking of?
WORK IN PROGRESS