Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Home
- /
- Analytics
- /
- Forecasting
- /
- Time Series Forecasting System shows wrong estimates

Options

- RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

🔒 This topic is **solved** and **locked**.
Need further help from the community? Please
sign in and ask a **new** question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Posted 02-10-2018 05:48 PM
(830 views)

I have come across this strange case in SAS Time Series Forecasting System and it seems that SAS is displaying wrong estimates.

Here is a simple example.

When I fit a quadratic trend to my dataset using TSFS, I get the following estimates:

Model Parameter | Estimate | Std. Error | T | Prob>|T| |
---|---|---|---|---|

Intercept | 3.85465 | 0.3471 | 11.1041 | <.0001 |

Linear Trend | -0.03373 | 0.0089 | -3.7788 | 0.0003 |

Quadratic Trend | -0.00117 | 0.000353 | -3.3153 | 0.0013 |

Model Variance (sigma squared) | 5.08917 | . | . | . |

Now, when I run a simple regression (proc reg) on the same dataset, using proc reg, I get totally different results

Parameter Estimates | |||||
---|---|---|---|---|---|

Variable | DF | Parameter Estimate |
Standard Error |
t Value | Pr> |t| |

Intercept | 1 | 2.52733 | 0.71316 | 3.54 | 0.0006 |

t | 1 | 0.08578 | 0.03465 | 2.48 | 0.0152 |

t2 | 1 | -0.00117 | 0.00035340 | -3.32 | 0.0013 |

Interestingly, the oredicted values shown by TSFS system seem to be following the estimates shown by the PROC REG.

Here is the predicted values of TSFS for the first three observations

Obs | PERIOD | ACTUAL | Predicted value for INCIDENTS |
Upper 95% Confidence Limit |
Lower 95% Confidence Limit |
Prediction error for INCIDENTS |
Prediction standard error |
Normalized prediction error for INCIDENTS |
Linear Trend | Quadratic Trend |
---|---|---|---|---|---|---|---|---|---|---|

1 | NOV2009 | 1.0000 | 2.6119 | 7.0335 | -1.8096 | -1.6119 | 2.2559 | -0.7145 | -50 | 2500 |

2 | DEC2009 | 2.0000 | 2.6942 | 7.1157 | -1.7273 | -0.6942 | 2.2559 | -0.3077 | -49 | 2401 |

3 | JAN2010 | 4.0000 | 2.7741 | 7.1956 | -1.6474 | 1.2259 | 2.2559 | 0.5434 | -48 | 2304 |

The values in the fourth column (Predicted value for INCIDENTS) are based the parameter estimates form PROC REG and not the estimates from TSFS. for example, for first observations:

2.52733+ 0.08578*1 -0.00117*(1^2)=2.6119

I noticed that this discrepancy between the estimates of proc OLS and TSFS happens only when there are high order terms included in the model (such as quadratic or cubic).

Why is this happening and how can I get correct estimates using TSFS.

1 ACCEPTED SOLUTION

Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Hi,

The differences you observed in the parameter estimates between the TSFS results and PROC REG are due to a difference in the definition of the linear and quadratic time trend terms. For the quadratic time trend curve, the TSFS defines the _LINEAR_ regressor as t - c, and the _QUAD_ regressor as ( t - c ) **2, whereas your PROC REG step uses t and t**2, respectively. Details on the definitions of the time trend terms used by the TSFS can be found in the following section of the documentation:

For your data (and most of the other series I tested), c=50. You can determine the value of "c" used by the TSFS by looking at the Forecast Table in the Model Viewer. The last two columns of this table contain the values of the _LINEAR_ and _QUAD_ variables.

To reproduce the parameter estimates observed in the TSFS by using PROC REG, you will need to define your time trend variables in the same manner as was used in the TSFS. Please note that the predicted values will be the same between the TSFS and PROC REG, regardless of which definition of the time trend terms is used.

I hope this helps!

DW

2 REPLIES 2

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Hi,

The differences you observed in the parameter estimates between the TSFS results and PROC REG are due to a difference in the definition of the linear and quadratic time trend terms. For the quadratic time trend curve, the TSFS defines the _LINEAR_ regressor as t - c, and the _QUAD_ regressor as ( t - c ) **2, whereas your PROC REG step uses t and t**2, respectively. Details on the definitions of the time trend terms used by the TSFS can be found in the following section of the documentation:

For your data (and most of the other series I tested), c=50. You can determine the value of "c" used by the TSFS by looking at the Forecast Table in the Model Viewer. The last two columns of this table contain the values of the _LINEAR_ and _QUAD_ variables.

To reproduce the parameter estimates observed in the TSFS by using PROC REG, you will need to define your time trend variables in the same manner as was used in the TSFS. Please note that the predicted values will be the same between the TSFS and PROC REG, regardless of which definition of the time trend terms is used.

I hope this helps!

DW

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Thank you very much for your response! It was really helpful.

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

**If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. **

Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.