Confidence ellipse / eigenvectors

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

Posts: 7
Joined: Fri Feb 09, 2018 12:07 pm

Confidence ellipse / eigenvectors

Postby AbnormalDistribution » Sun Sep 29, 2019 8:37 pm

I want to create a 95% confidence ellipse over my x y scatter plot. Here is a reference visual:

error_ellipse1.png (17.34 KiB) Viewed 3370 times

I have not found anything in the eviews GUI, but perhaps there are some features I can use to help me.

If eviews doesn't have built-in support for confidence ellipses, where can I find the values for the pink and green lines in the confidence ellipse picture above? In other words, assuming I have a group comprised of the series: x,y -- how can I retrieve the eigenvectors of the covariance matrix for x & y?

Specifically, I'll need the eigenvector of the covariance matrix that corresponds to the largest eigenvalue (one for x and one for y). This will get me closer to computing the ellipse from scratch.

EViews Glenn
EViews Developer
Posts: 2642
Joined: Wed Oct 15, 2008 9:17 am

Re: Confidence ellipse / eigenvectors

Postby EViews Glenn » Wed Oct 30, 2019 11:36 am

Two parts to the question.

First, you can add a confidence ellipse as a layer to the scatterplot. From the interface, click on the graph, and select the desired confidence ellipse in the Fit Line combo.

In command form

Code: Select all

group grp1 x y
grp1.scat cellipse

There are options for the computation of the ellipse. ... 23ww245664

There are some example commands.

As to the second part,

Code: Select all

grp1.pcomp(eigval=eval, eigvec=evec)

will save the eigenvector and eigenvalues.

There are various options for the covariance and correlation computation.

Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 5 guests