Persistent error using LINREG

Econometrics questions and discussions
SRedford
Posts: 4
Joined: Mon Jul 07, 2014 4:48 am

Persistent error using LINREG

Unread post by SRedford »

Hi,

So firstly, I am totally new to RATS, so bumbling along quite a bit, however I have managed to get rid of many SX 11 errors, but I have one now that refuses to go away and I have no idea what is wrong.

The file I am running is attached, and the data reads in successfully and is transformed successfully, but then I try to run a simple linear regression.
LogYielddata.RPF
(906 Bytes) Downloaded 991 times
I have tried to do this both manually and using the wizard and if I run the regression I want to run of DLJAYC10 on a constant and SLJAYC10 then I get the message :
## SX11. Identifier SLJAYC10 is Not Recognizable. Incorrect Option Field or Parameter Order?
>>>># SLJAYC10<<<<

If I run it just on a constant I get the following:
## SX11. Identifier DLJAYC10 is Not Recognizable. Incorrect Option Field or Parameter Order?
>>>>LINREG DLJAYC10 <<<<

I have checked the forum, reference manual, user guide, enders manual and the introduction and am not seeing what is missing.

Many thanks for any help.

Regards
Siobhan
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Persistent error using LINREG

Unread post by TomDoan »

New to RATS, but you got some oldish-looking program code. SCRATCH + LABELS doesn't define names for the series that you can use for input, just for output. You could fix it with

LINREG %s("DLJAYC10") 1995:05:28 2014:07:06
# Constant %s("SLJAYC10")

which looks up the series by its label, but I better approach is to use %S and %L to manufacture series with the names that you want. Replace the SCRATCH and DO loops with:

dofor i = JAYC00 to JAYC25
set %s("L"+%l(i)) = log(i{0})
set %s("DL"+%l(i)) = log(i{0})-log(i{1})
end dofor i
*
dofor i = JAYC01 to JAYC25
set %s("SL"+%l(i)) = log(i{0})-log((i-1){0})
end dofor i

See page UG-20 in the version 8 User's Guide.
Post Reply