Print all Statistics in one window

For questions and discussion related to graphs, reports, and other output, including issues related to presenting or publishing results.
lsal0106

Print all Statistics in one window

Unread post 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 :)
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Print all Statistics in one window

Unread post by TomDoan »

TABLE gets most of the important ones.
lsal0106

Re: Print all Statistics in one window

Unread post by lsal0106 »

Thank You for that! :)
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Print all Statistics in one window

Unread post 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)
Attachments
brooks.rat
Data file
(676.25 KiB) Downloaded 1174 times
Post Reply