SHAZAM Community
Ask Your Question

illegal lag

asked 2014-11-13 19:06:00 +0000

EDP gravatar image

I'm using the following equation in a nonlinear regression:

LnVol=AEXP(-a1(TV+LAG(TV)/10)) + BEXP(-b1TV_Net) + Baseline

I receive a warning for every line: "Illegal Lag"

Why am I receiving this warning message?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-11-18 22:58:26 +0000

It is not easy to determine the cause of this without seeing the rest of the data / script. To resolve these sorts of things try:

Assign the LAG(TV) to a variable and then use that within the command - see if the error repeats.



  • Check the sample size to be sure sufficient data exists for all variables.
  • Attempt a simpler equation before adding complexity. If the problem is intractable you may pick up the reason.
  • If this fails, send an example that replicates the problem along with the data and commands, to SHAZAM Help and we will take a look.
edit flag offensive delete link more
Login/Signup to Answer

Question Tools


Asked: 2014-11-13 19:06:00 +0000

Seen: 1,358 times

Last updated: Nov 18 '14