Hello, I was given a workfile with hundreds of equations as objects. Is there a quick way to automatically convert the equations into code for the program file?
I would rather not have to open each one and copy past them onto the program. Thank you.
How to quickly convert equation objects to code for a program file?
Moderators: EViews Gareth, EViews Moderator
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13600
- Joined: Tue Sep 16, 2008 5:38 pm
Re: How to quickly convert equation objects to code for a program file?
What do you mean by "convert the equations into code"?
What are you trying to do?
What are you trying to do?
Re: How to quickly convert equation objects to code for a program file?
I only have a workfile that has hundreds of objects (e.g., graphs, equations, tables, etc). By "convert to code", I mean, is there a quick/automated way to turn the equations (objects) in this workfile into lines of code for a program file?
For example, there are multiple least squares equations saved in this workfile. Is there a quick way to get the equivalent lines of code (or syntax) for each of these equations that does not require me to open each one and copy-paste the equations/variables? Like maybe a loop or some function I can use?
Thank you.
For example, there are multiple least squares equations saved in this workfile. Is there a quick way to get the equivalent lines of code (or syntax) for each of these equations that does not require me to open each one and copy-paste the equations/variables? Like maybe a loop or some function I can use?
Thank you.
Last edited by JC198998 on Fri Mar 28, 2025 10:03 am, edited 1 time in total.
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13600
- Joined: Tue Sep 16, 2008 5:38 pm
Re: How to quickly convert equation objects to code for a program file?
Sorry, still not clear. Are you trying to extract the results of the equations? Or re-estimate them, with the current spec? Or what?
Re: How to quickly convert equation objects to code for a program file?
Yes, I would like to re-estimate them.
For example, there is a least squares equation saved as an object in this workfile. I'd like to get the syntax/code that estimates this specific equation, so I can input it into a program file (instead of having just the workfile). Is there quick way to do this for tens of equations that are saved in the workfile?
Let me know if this is still not clear. I can elaborate further. Thank you for your patience.
For example, there is a least squares equation saved as an object in this workfile. I'd like to get the syntax/code that estimates this specific equation, so I can input it into a program file (instead of having just the workfile). Is there quick way to do this for tens of equations that are saved in the workfile?
Let me know if this is still not clear. I can elaborate further. Thank you for your patience.
Re: How to quickly convert equation objects to code for a program file?
I think a clearer explanation would be - in this workfile, there is a least squares equation named ls_1 that is specified as Dep1, Var1, Var2, etc.
I'd like to get the syntax/code/specification (i.e., 'equation ls_1.ls Dep1 Var1 Var2') for a new program file without having to manually open the object and then click on (1) proc, (2) specify/estimate, and copy-paste the specification written on the "Equation Estimation".
I'd like to know if there is a quick/automated way to get the syntax/code/specification of all equations saved in the workfile.
I hope this helps. Thank you for your time.
I'd like to get the syntax/code/specification (i.e., 'equation ls_1.ls Dep1 Var1 Var2') for a new program file without having to manually open the object and then click on (1) proc, (2) specify/estimate, and copy-paste the specification written on the "Equation Estimation".
I'd like to know if there is a quick/automated way to get the syntax/code/specification of all equations saved in the workfile.
I hope this helps. Thank you for your time.
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13600
- Joined: Tue Sep 16, 2008 5:38 pm
Re: How to quickly convert equation objects to code for a program file?
Something like this:
would retrieve the command used to estimate each equation.
Code: Select all
%eqlist = @wlookup("*", "equation")
table eqlist
!rc = 1
for %j {%eqlist}
eqlist(!rc,1) = %j
eqlist(!rc,2) = {%j}.@command
next
Return to “General Information and Tips and Tricks”
Who is online
Users browsing this forum: No registered users and 1 guest
