Switching QQ Plot Axes, Generate New Series

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

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

diggetybo
Posts: 152
Joined: Mon Jun 23, 2014 12:04 am

Switching QQ Plot Axes, Generate New Series

Postby diggetybo » Sun Oct 15, 2017 3:13 am

As far as I know, one of the easiest ways to make a Theoretical Quantile vs Standardized Residual plot is through the following commands:

Code: Select all

my_equation.makeresid(s) standardized_residuals
standardized_residuals.qqplot theory


That gave me something that looks like this:
qq plot 2.png
qq plot 2.png (6.05 KiB) Viewed 302 times


Note that the x axis reads "Quantiles of Standardized Residuals". Unfortunately, I have to conform to the convention of having the random quantity on the Y axis (and fixed quantity on the x axis), so I will need to switch the axes somehow. Is there an argument for that? I did not come across one in the manual.

I would also accept a solution where one saves the theoretical quantile as a separate series. If I had that, I presume I could do:

Code: Select all

std_resid_qq_series.line


Then I could overlay the standardized residuals as dots.

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

Re: Switching QQ Plot Axes, Generate New Series

Postby EViews Gareth » Mon Oct 16, 2017 8:31 am

Freeze it to a graph, then use graph.setelem axis to change the axis they are on.
Follow us on Twitter @IHSEViews

diggetybo
Posts: 152
Joined: Mon Jun 23, 2014 12:04 am

Re: Switching QQ Plot Axes, Generate New Series

Postby diggetybo » Mon Oct 16, 2017 9:17 am

Perfect! That's just what I was looking for.

Just for robustness, is there also a way to achieve the latter of my ideas? Generating a new series that contains the theoretical quantile so that I may include it for general purpose graphing? I know there is a make distdata command, but it returns a matrix and it seems to be slightly different than what I have in my graphs as pictured in my original post.

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

Re: Switching QQ Plot Axes, Generate New Series

Postby EViews Gareth » Mon Oct 16, 2017 10:43 am

Follow us on Twitter @IHSEViews


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 3 guests