Page 1 of 1

Problem with eViews 8.0 (Syntax error)

Posted: Sun Mar 16, 2014 3:36 am
by LeonWalras
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.

Re: Problem with eViews 8.0 (Syntax error)

Posted: Sun Mar 16, 2014 5:19 pm
by EViews Gareth
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

Re: Problem with eViews 8.0 (Syntax error)

Posted: Sun Mar 16, 2014 5:20 pm
by EViews Glenn
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

Code: Select all

ls log(y) c log(k) log(l) log(m)
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.