Forecasting a Linear model
Posted: Sat Sep 27, 2025 4:16 pm
Hello, I want to forecast the following linear AR model:
DO I=0,20,1
*
LINREG(DEFINE=FOREQ,NOPRINT) Y 1998:1 2019:12+I
# constant Y{1 3 4 5 7 }
***
STEPS(NOPRINT) 1 1 2020:1+I
# FOREQ LF 2020:1+I LFE
*
SET SLFE = LFE**2
STATISTICS(noPRINT) SLFE
COMPUTE RMSE = SQRT(%MEAN)
DISPLAY 'MEAN' %MEAN 'RMSE' RMSE 'I' I
END DO I
*********
However, when I run this code, I got the error message. How can I correct this ?
## SX11. Identifier LF is Not Recognizable. Incorrect Option Field or Parameter Order?
>>>># FOREQ LF <<<<
Is it possible you meant
%L
If the name isn't mistyped, it's possible that you have a poorly formatted instruction
Common errors are
* a space before the ( in an option field
* a missing space before = in a SET or FRML
* a missing $ at the end of a long line which continues to the next
Thank you for your help.
DO I=0,20,1
*
LINREG(DEFINE=FOREQ,NOPRINT) Y 1998:1 2019:12+I
# constant Y{1 3 4 5 7 }
***
STEPS(NOPRINT) 1 1 2020:1+I
# FOREQ LF 2020:1+I LFE
*
SET SLFE = LFE**2
STATISTICS(noPRINT) SLFE
COMPUTE RMSE = SQRT(%MEAN)
DISPLAY 'MEAN' %MEAN 'RMSE' RMSE 'I' I
END DO I
*********
However, when I run this code, I got the error message. How can I correct this ?
## SX11. Identifier LF is Not Recognizable. Incorrect Option Field or Parameter Order?
>>>># FOREQ LF <<<<
Is it possible you meant
%L
If the name isn't mistyped, it's possible that you have a poorly formatted instruction
Common errors are
* a space before the ( in an option field
* a missing space before = in a SET or FRML
* a missing $ at the end of a long line which continues to the next
Thank you for your help.