# Re-creating a Prediction Model from Regression Coefficients

## Recommended Posts

• Super Seeqer

Another common question through the support portal this morning that is of general interest

Quote

I did a multi variable regression in SEEQ and the model predicted with below coefficients.
Can you guide me, based on coefficients and signals used, what would be the resultant mathematical formula for the predicted signal?

To help with this example I am going to create a quick polynomial prediction using Data from Area C in the example set. Our target is going to be to try to predict compressor power as a function of all of the input weather signals

If you wanted to re-create this prediction model in excel or another tool you need the coefficients from block #1 in the screenshot above and the y-intercept from block #2 in the screenshot. Inside of the workbench tool you will see rounded values for each of the coefficients and intercepts but the full values are available when you copy them to the clipboard by clicking the little button highlighted in red.

To fill out the example in excel the formula will look like the following

`\$temperature^2 * -0.000230 + \$temperature * 0.0607 + \$WB^2 * 0.000646 + \$WB * -0.101 + 6.5946`

A final point to mention here is that for multi-variable regressions with many input signals it is important to take a minute and evaluate the p-values listed in the coefficient table. If the p-values for any coefficient are above 0.05 it is best practices to rethink if that signal needs to be included in the model at all or if you may need to perform data data cleansing or re-alignment to create a better performing model.

Good blog post on P-values - https://medium.com/analytics-vidhya/understanding-the-p-value-in-regression-1fc2cd2568af

Great reference post on how to optimize regression models using time shifting -