Page 1 of 1

### How can I retrieve statistics from a View of an object?

Posted: Wed Sep 17, 2008 2:03 pm
For example I can perform a Wald test from my equation, but I cannot retrieve the p-values and store them in a scalar in a program. Is there a way to do this?

Posted: Wed Sep 17, 2008 2:14 pm
Many of our Views, such as tests from an equation, do not have an inbuilt way to retrieve the statistics. However you can always retrieve values by first freezing the view into a table, and then referencing the cell containing that value.

For example:

Code: Select all

`freeze(tab1) eq01.wald c(1)=0scalar f_pvalue = @val(tab1(6,4))`

### Re: How can I retrieve statistics from a View of an object?

Posted: Sat May 22, 2010 11:46 am
Hey there, I want to extract F-statistics from Chow tables recursively (meaning I have to freeze around 130 tables and extract the F statistics). However, naturally, I get an error after the first one. Is there any command to close the table?

### Re: How can I retrieve statistics from a View of an object?

Posted: Sat May 22, 2010 3:12 pm
Which error are you getting?

### Re: How can I retrieve statistics from a View of an object?

Posted: Sun May 23, 2010 6:44 am
Sorry, I'm not getting any error. It's just the Chow series that are not filled (just with N/As). I am sure I am doing something wrong with the way I specify the dates for the Chow test.

Code: Select all

`workfile taylor m 1999m01 2008m12smpl 1999m01 2008m12equation eq03.ls eonia c infl_h indgapseries(120) chow_recseries(120) chow_rec_p!i=1while !i<120+1freeze(tabchow) eq03.chow @first+!ichow_f(!i,1) = @val(tabchow(6,2))chow_f_p(!i,1) = @val(tabchow(6,5))d tabchow!i=!i+1wendd iterad eq03`

Note: I have also tried replacing the @first+!i with 1999m01+!i, but eviews always tells me that this is an illegal date. Any thought on how to solve this? I have tried going through the command reference, but I was not enlightened on this issue.

### Re: How can I retrieve statistics from a View of an object?

Posted: Sun May 23, 2010 10:31 am
kipfilet
The attached code (using ev5) may help you make progress. It does the same chow breaktest over and over. You can see that you have to work a bit harder ( I,ve not done it here) to supply the changing breakpoint date and the date has to imply sufficient observations in the earlier and later periods.
Gerald

Code: Select all

`workfile taylor m 1999m01 2008m12smpl 1999m01 2008m12'series eonia = @rnormseries infl_h = @rnormseries indgap = @rnorm'equation eq03.ls eonia c infl_h indgapseries chow_fseries chow_f_p!i=25while !i<60freeze(tabchow) eq03.chow "2001m01"chow_f(!i) = @val(tabchow(3,2))chow_f_p(!i) = @val(tabchow(3,5))d tabchow!i=!i+1wendstop`

### Re: How can I retrieve statistics from a View of an object?

Posted: Wed May 26, 2010 7:01 pm
Concerning the "freezing 130 tables", you may as well just freeze the table with the same name and then delete it after you are through with it. It helped a lot when I started getting workfiles with millions of frozen VAR output tables! Just a thought!

### How can I retrieve statistics from a View of an object?

Posted: Wed May 26, 2010 7:27 pm
Or, just use the mode=overwrite option on the freeze command.