I cannot seem to figure out how to write a scalar to a FAME database. The COPY instruction appears to only work for data series.
More generally, what is the best way to output model statistics from a program in a way that could later be recalled by an external program (Rats or otherwise)? For example, if I have two programs (file1.prg and file2.prg) that each run separate OLS regressions, is there a way to store the file1_Rbarsq and file2_Rbarsq that would then be accessible by their variable names from a third program (file3.prg)?
The best I seem to be able to do is something like the following:
Code: Select all
open data quahvahey.rat
calendar(m) 1968:1
data(format=rats) 1968:1 1993:5 indprod lrpi
set y = indprod
set x = lrpi
linreg y
# constant x x{1}
compute model1_Rbar = %RBARSQ
open(format=rats) copy stats.rat
write(unit=copy) model1_RbarCode: Select all
decl real m1
open data stats.rat
read(unit=data) m1
disp m1Also, can anyone give me a bit of insight into the I/O format "rats"? Is there documentation that I can read as to how it differs from a regular ASCII file?
Thanks in advance,
Geoff