check structure of results file
Problem
Posting results accurately into a frame requires to know the variable order of the results frame. Currently, options of fine-tuned options of mpitb rframe
and mpitb stores
facilitate the same order, although this is not really convenient (limits to flexibility and additional variables).
In principle, this this challenge may arise in different contexts, e.g.,
mpitb est
mpitb estcot
mpitb stores
Effectively, however, it is the low-level tool mpitb stores
which dumps the results into the frame.
Therefore, either a subroutine within mpitb stores
or a stand-alone tool to check result file characteristics is needed.
Relations
This tool could be useful (i) to implement an append-to-existing-results-frame-functionality (#42), (ii) to add more than one extra variable (#44) and to inform the results preview function (#28).
Potential features
- retrieve variable list in results frame (including their order)
- identify types of frames (HOT, COT, CME?) and type of variables (time stamps, loa)
- point to differences in assumed and actual structure of results file
Current state
Characteristics already set by rframe
are
- binary for timestamps
- type: { level | level | level-hot changes }
Additionally, one could add the following chars
-
_dta[addvar]
which contains the names of the additional variable (as well as the order)
Several variable names are hard-coded:
- core: b se ll ul pval tval loa measure indicator spec wgts k ctype subg
- time stamps: ts_est ts_data
- tvars: t
- cot: yt0 yt1 t0 t1 ann
These variables may be used to identify structures (and may not be added manually).
Potential solutions
- query variable list with
ds
- use existence of certain variables to identify the need for specific
mpitb stores
option - custom user-added variables maybe identified either as remaining variables or via data characteristic
- consider to separate routines: (i) one for reporting the result file structure and (ii) one for checking whether user-input matched
- remember that
addmeta
may contain relevant code as well