VAR Data Members

For requesting general information about EViews, sharing your own tips and tricks, and information on EViews training or guides.

Moderators: EViews Gareth, EViews Moderator

RDS
Posts: 85
Joined: Thu Feb 17, 2011 9:50 am

VAR Data Members

Postby RDS » Tue Nov 05, 2013 10:36 am

I need to save the Schwarz criterion and the log likelihood of a specific equation of a VAR.

This for example doe not work:
var example_var.ls 1 2 x1 x2 x3
scalar loglikelihood = example_var.@eqlogl(1)
scalar SC = example_var.@schwarz(1)

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

Re: VAR Data Members

Postby EViews Gareth » Tue Nov 05, 2013 10:49 am

VAR data members are located at the start of the VAR section of the Object Reference.

Each object's data members are located at the start of its section in the Object Reference.
Follow us on Twitter @IHSEViews

RDS
Posts: 85
Joined: Thu Feb 17, 2011 9:50 am

Re: VAR Data Members

Postby RDS » Tue Nov 05, 2013 11:10 am

Yes, I looked at the Object reference. As said this does not worK:

var example_var.ls 1 2 x1 x2 x3
scalar loglikelihood_x1 = example_var.@eqlogl(1)
scalar SC_x1 = example_var.@sc(1)

The numbers I get are not those reproduced by EVIEWS in its Vector Autoregression Estimates.

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

Re: VAR Data Members

Postby EViews Gareth » Tue Nov 05, 2013 11:25 am

Ah, sorry, I missed the part where you said you wanted the equation specific one. Only the system wide ICs are available from the VAR, not the equation specific ones.

You can, of course calculate it though:

Code: Select all

create u 100
series x1=nrnd
series x2=nrnd
series x3=nrnd

var example_var.ls 1 2 x1 x2 x3
scalar loglikelihood_x1 = example_var.@eqlogl(1)
!t = example_var.@eqregobs(1)
!l = example_var.@eqlogl(1)
!n = example_var.@eqncoef(1)
scalar SC_x1 = -2*!l/!t + !n*@log(!t)/!t

show example_var
show sc_x1
Follow us on Twitter @IHSEViews

RDS
Posts: 85
Joined: Thu Feb 17, 2011 9:50 am

Re: VAR Data Members

Postby RDS » Tue Nov 05, 2013 11:35 am

These are the number of your VAR
x1 x2 x3
Log likelihood -144.4427 -132.9798 -138.4324
Schwarz SC 3.275307 3.041371 3.152648

and these are the values of your scalar sc_x1 = 8.78354 and loglikelihood_x1 = -414.34622

They are very different.

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

Re: VAR Data Members

Postby EViews Gareth » Tue Nov 05, 2013 11:41 am

In mine they match. What's the version and build date of your copy of EViews (Help->About EViews)?
Follow us on Twitter @IHSEViews

RDS
Posts: 85
Joined: Thu Feb 17, 2011 9:50 am

Re: VAR Data Members

Postby RDS » Wed Nov 06, 2013 1:43 am

Version 7.2
Enterprise edition Sep 23 2011 buid

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

Re: VAR Data Members

Postby EViews Gareth » Wed Nov 06, 2013 7:58 am

Update to the latest version.
Follow us on Twitter @IHSEViews

RDS
Posts: 85
Joined: Thu Feb 17, 2011 9:50 am

Re: VAR Data Members

Postby RDS » Thu Nov 07, 2013 11:01 am

There is a bug in eviews 7.2?

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

Re: VAR Data Members

Postby EViews Gareth » Thu Nov 07, 2013 11:16 am

Well that might explain why you're not getting matching results. Your copy is very out of date. There have been 46 patches since your version, each of which contains multiple bug fixes.
Follow us on Twitter @IHSEViews


Return to “General Information and Tips and Tricks”

Who is online

Users browsing this forum: No registered users and 6 guests