For questions and discussion related to graphs, reports, and other output, including issues related to presenting or publishing results.
by lsal0106 » Fri Oct 19, 2012 2:34 am
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

-
lsal0106
-
- Posts: 14
- Joined: Mon Oct 01, 2012 8:57 pm
by TomDoan » Fri Oct 19, 2012 6:35 am
TABLE gets most of the important ones.
-
TomDoan
-
- Posts: 2717
- Joined: Wed Nov 01, 2006 5:36 pm
by lsal0106 » Thu Oct 25, 2012 4:17 am
Thank You for that!

-
lsal0106
-
- Posts: 14
- Joined: Mon Oct 01, 2012 8:57 pm
by TomDoan » Mon Oct 29, 2012 12:13 pm
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 30 times
-
TomDoan
-
- Posts: 2717
- Joined: Wed Nov 01, 2006 5:36 pm
Return to Graphics, Reports, and Other Output
Who is online
Users browsing this forum: No registered users and 1 guest