Page 1 of 1

Print all Statistics in one window

Posted: Fri Oct 19, 2012 2:34 am
by lsal0106
Hi everyone,

I was just wondering if there is a way in RATS to print all descriptive statistics into one Window to be easily copied into Excel? For example at the moment in my code to get the descriptive statistics I have (as part of the code)

STATS(SMPL=C1) ONE(1)
STATS(SMPL=C1) FIVE(1)
STATS(SMPL=C1) TEN(1)

STATS(SMPL=C2) ONE(2)
STATS(SMPL=C2) FIVE(2)
STATS(SMPL=C2) TEN(2)

The code is long as unfortunately I could not figure out a way to specify the sample of each series. Is there a way i can say get all of the above 6 descriptive stats to print in one report window?

Thanks in advance :)

Re: Print all Statistics in one window

Posted: Fri Oct 19, 2012 6:35 am
by TomDoan
TABLE gets most of the important ones.

Re: Print all Statistics in one window

Posted: Thu Oct 25, 2012 4:17 am
by lsal0106
Thank You for that! :)

Re: Print all Statistics in one window

Posted: Mon Oct 29, 2012 12:13 pm
by TomDoan
This does a different collection of statistics than TABLE (includes skewness, kurtotsis, Jarque-Bera and a Q-statistic).

Code: Select all

*
* Replication file for Brooks(1996), "Testing for non-linearity in daily
* sterling exchange rates", Applied Financial Economics, vol 6, pp
* 307-317.
*
open data brooks.rat
data(format=rats) 1 5191 d1 d2 d3 d4 d5 hol asp3 cdp3 dkp3 ffp3 gmp3 hkdp3 ilp3 jyp3 sfp3 usdp3
*
* Replicate Table 1
*
report(action=define)
report(atrow=1,atcol=1) "Series" "Mean" "Variance" "Skewness" "Kurtosis" "JB" "LB(10)"
dofor s = asp3 to usdp3
   stats(noprint) s
   report(row=new,atcol=1) %left(%l(s),1) %mean %variance %skewness %kurtosis %jbstat
   corr(noprint,method=yule,number=10,qstats) s
   report(row=current,atcol=7) %qstat
end dofor s
report(action=format,atcol=2,tocol=5,picture="*.####")
report(action=format,atcol=6,tocol=7,picture="*.##")
report(action=show)