I am currently working on a production function and did the following to transform it from a non-linear function to a linear function so that I could carry out an OLS:
genr log_y=@log(y)
genr log_k=@log(k)
genr log_l=@log(l)
genr log_m=@log(m)
genr log_e=@log(e)
I then entered: ls y k l m e
However, eViews (8.0 Demo) continues to tell me that there is a syntax error. How do I get around this?
Thank you in advance.
Problem with eViews 8.0 (Syntax error)
Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Problem with eViews 8.0 (Syntax error)
There is no syntax error that I can see, and, indeed, if I create a program with your lines of code, it runs fine. Perhaps you could explain exactly what you are doing?
Code: Select all
create u 100
series y=rnd
series k=rnd
series l=rnd
series m=rnd
series e=rnd
genr log_y=@log(y)
genr log_k=@log(k)
genr log_l=@log(l)
genr log_m=@log(m)
genr log_e=@log(e)
ls y k l m e
-
EViews Glenn
- EViews Developer
- Posts: 2682
- Joined: Wed Oct 15, 2008 9:17 am
Re: Problem with eViews 8.0 (Syntax error)
Where are you typing the "ls y k l m e" line?
If all of the genr statements worked, there is no reason for the latter equation spec to generate a syntax error (though my guess is that the E is really your error term which isn't a series in the workfile). In any event, what you want is to do the regression on the log transforms not on the original data. Your original spec was estimating a linear regression on the original data. A simpler way of doing what you want is, from the command line, entering
Note that I've added a constant to your equation as I suspect that's what you want.
If entering the spec in the equation dialog, simply omit the LS in the command. Putting the LS into the equation dialog would also generate a syntax error.
If all of the genr statements worked, there is no reason for the latter equation spec to generate a syntax error (though my guess is that the E is really your error term which isn't a series in the workfile). In any event, what you want is to do the regression on the log transforms not on the original data. Your original spec was estimating a linear regression on the original data. A simpler way of doing what you want is, from the command line, entering
Code: Select all
ls log(y) c log(k) log(l) log(m)If entering the spec in the equation dialog, simply omit the LS in the command. Putting the LS into the equation dialog would also generate a syntax error.
Who is online
Users browsing this forum: No registered users and 2 guests
