Page 1 of 1

com automation and makeresid

Posted: Mon May 30, 2011 2:16 am
by Ravi
when I execute makeresid via a vb script by executing

Code: Select all

command = equation & ".makeresid temp_resid" app.Run(command) command = "freeze(mode=overwrite,temp_resid2) temp_resid" app.Run(command) command = "temp_resid2.save " & output & "\\ACT_FIT_RES\\" & equation & ".makeresid" app.Run(command)
I get the following result

Last updated: 05/30/11 - 14:31 Last updated: 05/30/11 - 14:31 Last updated: 05/30/11 - 14:31 Last updated: 05/30/11 - 14:31 Last updated: 05/30/11 - 14:31

XYZ - 12/04/04 NA NA NA NA NA
XYZ - 1/08/05 NA 0.327887 -0.331114 -0.225509 -0.00157
XYZ - 2/12/05 0.324257 -0.118165 -0.139507 -0.280549 0.064118
however when I do it through the graphic user interface of Eviews I get the following output
XYZ - 12/04/04 NA
XYZ - 12/11/04 NA
XYZ - 12/18/04 NA
XYZ - 12/25/04 NA
XYZ - 1/01/05 NA
XYZ - 1/08/05 NA
XYZ - 1/15/05 0.327887
XYZ - 1/22/05 -0.331114
XYZ - 1/29/05 -0.225509
XYZ - 2/05/05 -0.001570
XYZ - 2/12/05 0.324257
XYZ - 2/19/05 -0.118165
XYZ - 2/26/05 -0.139507
XYZ - 3/05/05 -0.280549
Why is this happening?
What changes do i need to do to the vb script to get the output as i am getting in GUI?

Thanks in advance.
-Ravi

com automation and makeresid

Posted: Mon May 30, 2011 6:08 am
by EViews Gareth
First thing to do is to ensure your copy of EViews is fully up to date. We had a recent bug that might make makeresid screwy.

Re: com automation and makeresid

Posted: Mon May 30, 2011 10:07 pm
by Ravi
First thing to do is to ensure your copy of EViews is fully up to date. We had a recent bug that might make makeresid screwy.
updated to 7.2 but still getting the same output

Re: com automation and makeresid

Posted: Tue May 31, 2011 1:48 pm
by EViews Steve
This is a bug related to the "mode=overwrite" attribute that you're using on the freeze command. Unfortunately, this bug is affecting the base object (temp_resid) as well as the frozen output (temp_resid2).

We will try to get this fixed in the next patch. For now, I would change your script to not use the "mode=overwrite" attribute and instead do the following to delete any pre-existing objects:

Code: Select all

on error resume next app.Run("delete temp_resid") app.Run("delete temp_resid2") on error goto 0 'or whatever your error handler is if you have one
Steve

Re: com automation and makeresid

Posted: Tue May 31, 2011 2:09 pm
by EViews Steve
Actually, another workaround would be to tell the freeze command which view to freeze (in your case, you want the "sheet" view):

Code: Select all

command = "freeze(mode=overwrite,temp_resid2) temp_resid sheet"
That will also made the freeze operation work properly.

Steve