Displaying several graphs in one graph!

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Jason, EViews Steve, EViews Moderator

Rocketeer
Posts: 2
Joined: Thu Jan 01, 2009 9:04 am

Displaying several graphs in one graph!

Postby Rocketeer » Thu Jan 01, 2009 10:14 am

Hi!

I'm trying to plot a histogram of a series called dly with daily data from a stock index.
Within the same plot I also want to have the normal distribution superimposed. I
don't know how to do this. I have tried the following code below but its not exactly
what I want.

dly.stats
dly.hist

series z = nrnd
freeze(graphEmpNorm) dly.cdfplot(c)
graphEmpNorm.addtext(b) Empirical Cumulative Distribution Function
freeze(graphTheorNorm) z.cdfplot(c)
graphTheorNorm.addtext(b) Gaussian Cumulative Distribution Function
show graphEmpNorm graphTheorNorm

Does anyone know how to plot a histogram of a series with the bell shaped normal
distribution superimposed?

Thanks!

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13319
Joined: Tue Sep 16, 2008 5:38 pm

Re: Displaying several graphs in one graph!

Postby EViews Gareth » Thu Jan 01, 2009 12:15 pm

You need to use a distribution plot:

freeze(graphEmpNorm) dly.distplot hist theory


That should do it.
Follow us on Twitter @IHSEViews

Rocketeer
Posts: 2
Joined: Thu Jan 01, 2009 9:04 am

Re: Displaying several graphs in one graph!

Postby Rocketeer » Thu Jan 01, 2009 3:59 pm

Hi! Thanks for your answer.

An error message says that distplot is not a valid view for dly.
I don't find distplot in the Command and Programming reference.
Maybe I should have posted in the EViews5 section. I use EViews
5.0. I'm sorry I didn't see this before posting my first message.


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 24 guests