R Integration

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Jason, EViews Moderator

Dennis
Posts: 16
Joined: Fri Dec 16, 2011 8:11 am

R Integration

Postby Dennis » Sun Dec 17, 2017 8:01 am

I tried the R Connector in Eviews 10, and it worked seamlessly. The Help file shows how to use XGET to bring coefficients into an Eviews workfile, and that also worked fine. However, I don't know how to bring other parts of R output into Eviews (e.g., std errors of coefs, t-stats, p-values). Is it possible to bring multiple columns of output from an R command back to Eviews, e.g., as an Eviews object? More generally, any guidance about getting results from R into to an Eviews workfile would be much appreciated.

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

Re: R Integration

Postby EViews Gareth » Mon Dec 18, 2017 9:04 am

Yes it is possible - from EViews' point of view there is no difference between coefficients and other values.

Without knowing the structure of the objects you are trying to retrieve, it is hard to give further advice.
Follow us on Twitter @IHSEViews

EViews Steve
EViews Developer
Posts: 510
Joined: Tue Sep 16, 2008 3:00 pm
Location: Irvine, CA

Re: R Integration

Postby EViews Steve » Mon Dec 18, 2017 7:03 pm

Our Get method takes a string. Just provide a string that represents what your trying to retrieve. You can also try just using the Run command and pass it “print expression” where expression is what you’re trying to get. That should print the value in the R Console window. Once you see the correct value, call Get with just the expression.


Sent from my iPhone using Tapatalk

EViews Steve
EViews Developer
Posts: 510
Joined: Tue Sep 16, 2008 3:00 pm
Location: Irvine, CA

Re: R Integration

Postby EViews Steve » Mon Dec 18, 2017 7:06 pm

Sorry I meant XGET and XRUN.


Sent from my iPhone using Tapatalk

Dennis
Posts: 16
Joined: Fri Dec 16, 2011 8:11 am

Re: R Integration

Postby Dennis » Fri Dec 29, 2017 9:03 pm

Thanks very much for explaining how to retrieve information from R. Your response is a great help.

I have another question. I believe that, with the XPUT command, NA's in Eviews are passed as zeros to R. Is there a setting that will require NA's from Eviews to be passed as NA's to R. The command I am using has the following form: XPUT(rtype=data.frame, name=vars) y x1 x2 ... xk

EViews Steve
EViews Developer
Posts: 510
Joined: Tue Sep 16, 2008 3:00 pm
Location: Irvine, CA

Re: R Integration

Postby EViews Steve » Tue Jan 02, 2018 9:39 am

I just confirmed that our R connector is not handling NAs correctly. This will be fixed in the next patch.

Steve


Return to “Programming”

Who is online

Users browsing this forum: Baidu [Spider] and 6 guests