Page 1 of 1
Creating a chart in prg
Posted: Thu Dec 18, 2014 2:01 pm
by msemaan
Hi
I would like to create a mutli-panel chart using results from a regression. Can someone give me a sample of code please ?
Thank you
Re: Creating a chart in prg
Posted: Thu Dec 18, 2014 4:15 pm
by EViews Gareth
Can you be more specific?
Re: Creating a chart in prg
Posted: Mon Dec 22, 2014 1:33 pm
by msemaan
Hi,
Once i am done with my equation (regression) i would like to create a chart with an upper paell showing the time series and the fitted value and the lower panel the standardized residuals.
What should i write after the equation to generate the fitted value and the residuals ?
Second question, what will be the transcript/code to create a two panel chart (with a zeroline in the lower panel)
Thank you so much
Re: Creating a chart in prg
Posted: Mon Dec 22, 2014 3:25 pm
by EViews Gareth
Code: Select all
create m 1990 2000
series y=nrnd
series x=nrnd
equation eq1.ls y c x
eq1.fit yf
group ys y yf
freeze(graph1) ys.line
eq1.makeresid res1
freeze(graph2) res1.line
graph2.axis(l) zeroline
graph mastergraph.merge graph1 graph2
Re: Creating a chart in prg
Posted: Mon Dec 22, 2014 3:56 pm
by msemaan
Thank you for the code.
The output is effectively two separate charts. How can i end up with a chart like the one i attached? two panels in the same chart charing the same x-axis for dates but with different y-axis.
Thanks a lot
Re: Creating a chart in prg
Posted: Mon Dec 22, 2014 4:27 pm
by EViews Gareth
Re: Creating a chart in prg
Posted: Mon Dec 22, 2014 5:05 pm
by msemaan
How can i create a chart like the one attached ?
Thanks again
Re: Creating a chart in prg
Posted: Mon Dec 22, 2014 6:18 pm
by EViews Gareth
Play around with the graph options dialog until you have it the way you want it, then show it to us, and we can tell you the programming way to achieve it.
Re: Creating a chart in prg
Posted: Thu Jan 01, 2015 2:29 pm
by msemaan
Here you go! i am attaching a chart i adjusted the way i like it to be. Can you help with the code please ?
Re: Creating a chart in prg
Posted: Thu Jan 01, 2015 7:26 pm
by EViews Gareth
Can you provide the EViews workfile containing that graph, rather than just a picture of it?