# Worksheet – Case #3 – Building a simple regression model

## Finding Data

In this case, we will reuse the document from Step 1 Case #9 which can be downloaded here. As such, all data needed for the exercise will already be in the document.

## Analysis

### Regression

In the case #10 from Level 1, we established that the ISM PMI is a leading indicator of the Industrial Production in the US, by 4 months.

Now, you will have to build a regression model using this information.

Remember that the correlation results were based using a data sample starting in 2000-01.

• Select “Rate of change” in the tree
• Click on “Add” and choose Regression

The first step will be to set the model and the outputs needed:

• Set the Start range to 2000
• Check the tick-box “Output the dependent series”
• In the output, include “Residuals” and “Residuals for forecast”

Now, you should set the model itself: you want to explain the Industrial Production by the ISM PMI.

• Check “Include for both series”
• Pick Industrial Production as the dependent series

Also, the best correlation between the two series was when the ISM PMI was lagged by 4 months. You should include this in the model:

• For the ISM PMI, Set “Lag from” and “Lag to” to 4

Finally, and since you are lagging the explanatory series, you can calculate forecasts (for 4 months).

• Tick the box “Calculate forecasts”

### Regression Report

As default, you always get a Report as first output of the regression analysis. You can check here several econometric statistics as well as the equation of the model.

## Charting

• Add a “Time Chart” after the Regression analysis

In our chart, we displayed the residuals in a secondary chart, below the main one. In Macrobond, we call this “Panes”. To add panes, you should:

• Go to Graph Layout
• Drag the “residuals” time series to the new pane
• Change its type from “Line” to “Column”

You can also automatically set the proportion of the panes.

• For our case, click on the 3rd option from the right (2:1)

(You can also manually adjust the ratio between the two panes by dragging the lower edge of upper chart up or down)

### Adding a title to the lower pane

Each Pane can have subtitles.

We begin by removing the redundant “%” sign on the lower pane:

• Click on it and hit delete.

Now, click on the background of the lower chart

• In “Presentation properties” Locate “Subtitle” in the “Elements group”, click on Edit…
• Having added your desired text, click on it and adjust the settings in “Presentation properties” to center the text

### Customizing an observation label

We will now briefly explore Dynamic properties to customize a text in Macrobond. First, add a chart annotation to the Industrial production:

• Go to the “Chart annotations” tab
• Choose “Observation label”
• Click on the last observation of the predicted series

To edit the text:

• Double-click the newly created observation label
• Change the text to: “Forecast for”

Then, add dynamic properties after this text:

• Open the dynamic properties menu, on the right
• In the tree, add “Current > Date” with the red + sign
• Go to a new line, and add “Current > Value”, followed by a ‘%’ sign

Finally, you can edit the format of the dynamic text:

• Click on the expression “{s.Date}
• Change the format to “Y”, using the drop-down menu

This will change the date-format to displaying the name of the month instead of the number.

However, right now, this observation label is associated to a specific date. You might want to always refer to the last predicted value when the chart will be updated. To remedy this:

• Click on the observation label
• On the “Presentation properties” tab, locate “Range”
• Change both the start and end of the interval to +0

The observation label will now always point to the last value of the Industrial Production series, and the text created using dynamic properties will also get updated automatically.

### Other changes:

• Chart title
• Legend text
• Legend position
• Y-axis text for the top pane