Page 1 of 1

How can I save output value data from Rats

Posted: Mon Jun 18, 2012 2:42 pm
by marvin2jhjh
Hello, I estimate comovement between two macro variables using Den Haan (2000) procedure which is available in estima website.

I mean Den Haans's paper titled comovement between outputs and prices (Journal of Monetary Economics).

The code enables me to show graphs, but I'd like to get the output, correlation coeffiients and, confidence level(99,95,90) values.
Could you let me know how to save these output values?


The following codes belong to part of computing confidence band and reporting graphs.

dec vect samesign(ncov)
do i=1,ncov
sstats(mean) 1 nboot (bootcorr(t)(i)>0.xor.basecorr(i)<0)>>samesign(i)
end do i
*
set c05 1 ncov = %if(samesign(t)>.95,basecorr(t),%na)
set c10 1 ncov = %if(samesign(t)>.90.and.samesign(t)<=.95,basecorr(t),%na)
set c00 1 ncov = %if(samesign(t)<=.90,basecorr(t),%na)
*
graph(nodates,style=bargraph,$
footer="Figure 3A Quarterly data with unit root imposed") 3
# c05 1 ncov
# c10 1 ncov
# c00 1 ncov

Re: How can I save output value data from Rats

Posted: Tue Jun 19, 2012 2:17 pm
by TomDoan

Code: Select all

clear(zeros) f99 f95 f90
do i=1,ncov
   set booti 1 nboot = bootcorr(t)(i)
   stats(fractiles,noprint) booti 1 nboot
   compute f99(i)=%fract99
   compute f95(i)=%fract95
   compute f90(i)=%fract90
end do i
The four series that you want are basecorr, f99, f95 and f90. You can do a COPY instruction to write those to a file.

Re: How can I save output value data from Rats

Posted: Mon Jun 25, 2012 10:14 pm
by marvin2jhjh
Thank you very much!!!