Refactoring initval_file and histval_file
initval_file and histvfal_file should be more flexible and have functionalities similar to option datafilein estimation
Usage
initval_file
- is used only in perfect foresight
- provides a guess value for computing the solution
- in absence of
histvalorhistval_fileprovides 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),.csvfiles - modifies directly
oo_.endo_simul,oo_.exo_simul, but notoo_.exo_det_simul
histval_file
- accept only files prepared by
smoother2histvalthat uses odd format - modifies directly
oo_.endo_simul,oo_.exo_simul, but notoo_.exo_det_simul - note that
histvalsets adseriesobject
Proposal
- have the same interface for
initval_fileandhistval_file - add an option
dseriesto be able to pass adseriesobject - handle references to
varexo_detvariables - use the
dseriesinterface to read files -
initval_fileandhistval_file```setdseries`` 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 optionfilenamehas changed - Function
initvalf.m-
M_andoptionsare added to inputs - the old
filenameinput triggers an error - function
initvalf()sets a resultdserieson output
-
- Function
histvalf.m-
M_andoptionsare added to inputs - the old
filenameinput triggers an error - function
histvalf()sets a resultdserieson output -
histvalf.mdoesn't recognize the oldsmoother2histvalfile format anymore.
-
- Function
smoother2histval.m- when an output file is requested
smoother2histval()creates a.matfile containing a singledseries -
smoother2histval.msaves now M_.orig_maximum_lagobservations instead ofoo_.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
dseriesinput in an instruction calledinitval_fileand no file strictly speaking of?
WORK IN PROGRESS
Edited by MichelJuillard