The Econometric Modeler app is an interactive tool for analyzing univariate time series data. The app is well suited for visualizing and transforming data, performing statistical specification and model identification tests, fitting models to data, and iterating among these actions. When you are satisfied with a model, you can export it to the MATLAB^{®} Workspace to forecast future responses or for further analysis. You can also generate code or a report from a session.
Start Econometric Modeler by entering econometricModeler
at the MATLAB command line, or by clicking Econometric Modeler under Computational Finance in the apps gallery (Apps tab on the MATLAB Toolstrip).
The following workflow describes how to find a model with the best insample fit to time series data using Econometric Modeler. The workflow is not a strict prescription—the steps you implement depend on your goals and the model type. You can easily skip steps and iterate several steps as needed. The app is well suited to the BoxJenkins approach to time series model building [1].
Prepare data for Econometric Modeler — Select a response variable to analyze and from which to build a predictive model. Optionally, select explanatory variables to include in the model.
Note
You can import only one variable from the MATLAB Workspace into Econometric Modeler. Therefore, at the command line, you must synchronize and concatenate multiple series into one variable.
Import time series variables — Import Data into Econometric Modeler from the MATLAB Workspace or a MATfile. After importing data, you can adjust variable properties or the presence of variables.
Perform exploratory data analysis — View the series in various ways, stabilize a series by transforming it, and detect time series properties by performing statistical tests.
Visualize time series data — Supported plots include time series plots and correlograms (for example, the autocorrelation function (ACF)).
Perform specification and model identification hypothesis tests — Test series for stationarity, heteroscedasticity, autocorrelation, and collinearity among multiple series. For ARIMA and GARCH models, this step can include determining the appropriate number of lags to include in the model. Supported tests include the augmented DickeyFuller test, Engle's ARCH test, the LjungBox Qtest, and Belsley collinearity diagnostics.
Transform time series — Supported transformations include the log transformation and seasonal and nonseasonal differencing.
Fit candidate models to the data — Choose model parametric forms for a univariate response series based on the exploratory data analysis or dictated by economic theory. Then, estimate the model. Supported models include seasonal and nonseasonal conditional mean (for example, ARIMA), conditional variance (for example, GARCH), and multiple linear regression models (optionally containing ARMA errors).
Conduct goodnessoffit checks — Ensure that the model adequately describes the data by performing residual diagnostics.
Visualize the residuals to check whether they are centered on zero, normally distributed, homoscedastic, and serially uncorrelated. Supported plots include quantilequantile and ACF plots.
Test the residuals for homoscedasticity and autocorrelation. Supported tests include the LjungBox Qtest and Engle's ARCH test on the squared residuals.
Find the model with the best insample fit — Estimate multiple models within the same family, and then choose the model that yields the minimal fit statistic, for example, Akaike information criterion (AIC).
Export session results — After you find a model or models that perform adequately, summarize the results of the session. The method you choose depends on your goals. Supported methods include:
Export variables — Econometric Modeler exports selected variables to the MATLAB Workspace. If a session in the app does not complete your analysis goal, such as forecasting responses, then you can export variables (including estimated models) for further analysis at the command line.
Generate a function — Econometric Modeler generates a MATLAB plain text or live function that returns a selected model given the imported data. This method helps you understand the commandline functions that the app uses to create predictive models. You can modify the generated function to accomplish your analysis goals.
Generate a report — Econometric Modeler produces a document, such as, a PDF, describing your activities on selected variables or models. This method provides a clear and convenient summary of your analysis when you complete your goal in the app.
You can import only one variable from the MATLAB Workspace into Econometric Modeler. Therefore, before importing data, concatenate the response series and any predictor series into one variable.
Econometric Modeler supports these variable data types.
MATLAB timetable — Variables must be doubleprecision numeric vectors. A best practice is to import your data in a timetable because Econometric Modeler:
Names variables by using the names stored in the VariableNames
field of the Properties
property.
Uses the time variable values as tick labels for any axis that represents time. Otherwise, tick labels representing time are indices.
Enables you to overlay recession bands on time series plots (see recessionplot
)
MATLAB table — Variables must be doubleprecision numeric vectors. Variable names are the names in the VariableNames
field of the Properties
property.
Numeric vector or matrix — For a matrix, each column is a separate variable named variableNamej
, where j
is the corresponding column.
Regardless of variable type, Econometric Modeler assumes that rows correspond to time points (observations).
The data set can exist in the MATLAB Workspace or in a MATfile that you can access from your machine.
To import a data set from the Workspace, on the Econometric Modeler tab, in the Import section, click . In the Import Data dialog box, click the check box in the Import? column for the variable containing the data, and then click Import. All variables in the Workspace of the supported data type appear in the dialog box, but you can choose one only.
To import data from a MATfile, in the Import section, click Import, then select Import From MATfile
. In the Select a MATfile dialog box, browse to the folder containing the data set, then doubleclick the MATfile.
After you import data, the name of each variable (column) in the data set appears in the Time Series section of the Data Browser. Also, a time series plot including all variables appears in the Time Series Plot(VariableName
) figure window, where VariableName
is the name of one of the variables in the Data Browser.
You can interact with the variables in the Data Browser in several ways.
To select a variable to perform a statistical test or create a plot, for example, click the variable in the Data Browser. If you doubleclick the variable instead, then the app also plots it in a separate time series plot.
To change a variable name or delete a variable, rightclick it in the Data Browser. Then, from the context menu, choose the desired action.
To operate on multiple time series simultaneously, press Ctrl and click each variable you want to use.
Consider importing the data in the Data_USEconModel
MATfile.
At the command line, load the data into the Workspace.
load Data_USEconModel
In Econometric Modeler, in the Import section of the Econometric Modeler tab, click . The Import Data dialog box appears.
Data_USEconModel
stores several variables. DataTable and Data contain the same data, but DataTable is a timetable that attributes names to variables and sampling times to rows. Import DataTable by selecting the corresponding Import? check box, then clicking Import.
All variables in DataTable appear in the Data Browser. Suppose that you want to retain COE
, FEDFUNDS
, and GDP
only. Select all other variables, rightclick one of them, and select Delete.
After working in the app, you can import another data set. After you click Import, Econometric Modeler displays the following dialog box.
If you click OK, then Econometric Modeler deletes all variables from the Data Browser, and closes all documents in the right pane.
An exploratory data analysis includes determining characteristics of your variables and relationships between them, with the formation of a predictive model in mind. For time series data, identify series that grow exponentially, contain trends, or are nonstationary, and then transform them appropriately. For ARIMA models, to identify the model form and significant lags in the serial correlation structure of the response series, use the BoxJenkins methodology [1]. If you plan to create GARCH models, then assess whether the series contain volatility clustering and significant lags. For multiple regression models, identify collinear predictors and those predictors that are linearly related to the response.
For time series data analysis, an exploratory analysis usually includes iterating among visualizing the data, performing statistical specification and model identification tests, and transforming the data.
After you import a data set, Econometric Modeler selects all variables in the imported data and displays a time series plot of them in the right pane by default. For example, after you import DataTable
in the Data_USEconModel
data set, the app displays this time series plot.
To create your own time series plot:
In the Data Browser, select the appropriate number of series for the plot.
Click the Plots tab in the toolstrip.
Click the button for the type of plot you want.
Econometric Modeler supports the following time series plots.
Plot  Goals 

Time series or 

Autocorrelation function (ACF) 

Partial ACF (PACF) 

Correlations 

You can interact with an existing plot by:
Rightclicking it
Using the plot buttons that appear when you pause on the plot
Using the options on the figure window
Supported interactions vary by plot type.
Save a figure — Rightclick the figure, then select Export. Save the figure that appears.
Add or remove time series in a plot — Rightclick the figure, point to Show Time Series menu, then select the time series to add or remove.
Plot recession bands — Rightclick a time series plot, then select Show Recessions.
Show grid lines — Pause on the figure, then click .
Toggle legend — Pause on the figure, then click .
Pan — Pause on the figure, then click . For more details on panning, see Zoom, Pan, and Rotate Data.
Zoom — Pause on the figure. To zoom in, click . To zoom out, click . For more details, see Zoom, Pan, and Rotate Data.
Restore view — To return the plot to its original view after you pan or zoom, pause on the figure, then click .
For serial correlation function plots, additional options exist in the ACF or PACF tabs. You can specify the:
Number of lags to display
Number of standard deviations for the confidence bands
MA or AR order in which the theoretical ACF or PACF, respectively, is effectively zero
Econometric Modeler updates the plot in real time as you adjust the parameters.
To view multiple plots simultaneously, you can orient plot tabs by dragging them into different sections of the right pane. As you drag a plot, the app highlights possible sections in which to place it. To undo the last document or figure window positioning, pause on the dot located in the middle of the partition, then click when it appears.
Consider an ARIMA model for the effective federal funds rate (FEDFUNDS
). To identify the model characteristics (for example, the number of AR or MA lags), plot the time series, ACF, and PACF sidebyside.
In the Data Browser, doubleclick FEDFUNDS
.
Add recession bands to the plot by rightclicking the plot in the Time Series Plot(FEDFUNDS) figure window, then selecting Show Recessions.
On the Plots tab, click ACF.
Click PACF.
Click the Time Series Plot(FEDFUNDS) figure window and drag it to the left side of the right pane. Click the PACF(FEDFUNDS) figure window and drag it to the bottom right of the pane.
The ACF dies out slowly and the PACF cuts off after the first lag. The behavior of the ACF suggests that the time series must be transformed before you choose on the form of the ARIMA model.
In the right pane, observe the dot in the middle of the horizontal partition between the correlograms (below the Lag x axis label of the ACF). To undo this correlogram positioning, that is, separate the correlograms by tabs, pause on the dot and click when it appears.
You can perform hypothesis tests to confirm time series properties that you obtain visually or test for properties that are difficult to see. Econometric Modeler supports these tests for univariate series.
Test  Hypotheses 

Augmented DickeyFuller  H_{0}: Series has a unit root. H_{1}: Series is stationary. For details on the supported parameters, see 
Kwiatkowski, Phillips, Schmidt, Shin (KPSS)  H_{0}: Series is trend stationary. H_{1}: Series has a unit root. For details on the supported parameters, see 
LeybourneMcCabe  H_{0}: Series is a trend stationary AR(p) process. H_{1}: Series is an ARIMA(p,1,1) process. To specify p, adjust the Number of Lags parameter. For details on the supported parameters, see 
PhillipsPeron  H_{0}: Series has a unit root. H_{1}: Series is stationary. For details on the supported parameters, see 
Variance ratio  H_{0}: Series is a random walk. H_{1}: Series is not a random walk. For details on the supported parameters, see 
Engle's ARCH  H_{0}: Series exhibits no conditional heteroscedasticity (ARCH effects). H_{1}: Series is an ARCH(p) model, with p > 0. To specify p, adjust the Number of Lags parameter. For details on the supported parameters, see 
LjungBox Qtest  H_{0}: Series exhibits no autocorrelation in the first m lags, that is, corresponding coefficients are jointly zero. H_{1}: Series has at least one nonzero autocorrelation coefficient ρ_{j}, j ∈ {1,…,m}. To specify m, adjust the Number of Lags parameter. For details on the supported parameters, see 
Note
Before conducting tests, Econometric Modeler removes leading and trailing missing values (NaN
values) in the series. Engle's ARCH test does not support missing values within the series, that is, NaN
values preceded and succeeded by observations.
The stationarity test results suggest whether you should transform a series to stabilize it, and which transformation is appropriate. For ARIMA models, stationarity test results suggest whether to include degrees of integration. Engle's ARCH test results indicate whether the series exhibits volatility clustering and suggests lags to include in a GARCH model. LjungBox Qtest results suggest how many AR lags are required in an ARIMA model.
To perform a univariate test in Econometric Modeler:
Select a variable in the Data Browser.
On the Econometric Modeler tab, in the Tests section, click New Test.
In the test gallery, click the test you want to conduct. A new tab for the test type appears in the toolstrip, and a new document for the test results appears in the right pane.
On the test type tab, in the Parameters section, adjust parameters for the test. For example, consider performing an Engle's ARCH test. On the ARCH tab, in the Parameters section, select the number of lags in the test statistic using the Number of Lags spin box, or the significance level (that is, the value of α) using the Significance Level spin box.
On the testtype tab, in the Tests section, click Run Test. The test results, including whether to reject the null hypothesis, the pvalue, and the parameter settings, appear in a new row in the Results table of the test results document. If the null hypothesis has been rejected, then the app highlights the row in yellow.
You can adjust parameters and run the test multiple times. The results from each test run for a particular variable appear as a new row in the Results table. To remove a row from the Results table, select the corresponding check box in the Select column, then click Clear Tests in the testtype tab.
Note
Multiple testing inflates the false discovery rate. One conservative way to maintain an overall false discovery rate of α is to apply the Bonferroni correction to the significance level of each test. That is, for a total of t tests, set Significance Level value to α/t.
For multiple series, you can assess the strength and sources of collinearity among the series using the Belsley collinearity diagnostics . To perform Belsley correlation diagnostics:
Select at least two variables in the Data Browser.
On the Econometric Modeler tab, in the Tests section, click New Test.
In the tests gallery, in the Collinearity section, click Belsley Collinearity Diagnostics. A new tab for Belsley collinearity diagnostics appears in the toolstrip, and a new document for the results appears in the right pane.
On the Collinearity tab, in the Tolerances section, adjust parameters for the test. The app performs diagnostics in real time as you adjust parameter values.
Econometric Modeler returns a table of the singular values, condition indices, and the variancedecomposition proportions for each variable. Rows Econometric Modeler highlights in yellow have a condition index greater than the tolerance specified by the Condition Index parameter value in the Tolerances section of the Collinearity tab. Also, Econometric Modeler plots the variancedecomposition proportions for the highlighted rows for each variable.
In the highlighted rows, those variables with variancedecomposition greater than the tolerance (or, those variables with red markers in the plot) exhibit multicollinearity. For more details on the Belsley collinearity diagnostics results and multicollinearity, see collintest
and Time Series Regression II: Collinearity and Estimator Variance.
To add or remove time series from the diagnostics:
In the testresults document, rightclick the Results table or plot.
Point to Show Time Series. A list of all variables appears.
Click a variable to add it to the diagnostics, or click a selected variable to remove it from the diagnostics.
Consider a predictive model containing Canadian inflation and interest rates as predictor variables. Determine whether the variables are collinear. The Data_Canada
data set contains the time series.
Import the DataTable
variable in the Data_Canada
data set into Econometric Modeler (see Import Time Series Variables). The time series plot appears in the right pane.
All series appear to contain autocorrelation. Although you should remove autocorrelation from predictor variables before creating a predictive model, this example proceeds without removing autocorrelation.
In the Tests section, click New Test. In the Collinearity section, click Belsley Collinearity Diagnostics.
Econometric Modeler creates a document containing the Belsley collinearity diagnostics results.
The condition index and variancedecomposition proportion tolerance defaults are 30
and 0.5
, respectively. Because their variancedecomposition proportions are above the tolerance for the condition index, the collinear predictors are INT_L
, INT_M
, and INT_S
.
The BoxJenkins methodology [1] for ARIMA model selection assumes that the response series is stationary, and spurious regression models can result from a model containing nonstationary predictors and response variables (for more details, see Time Series Regression IV: Spurious Regression). To stabilize your series, Econometric Modeler supports these transformations in the Transforms section of the Econometric Modeler tab.
Transformation  Use When Series ...  Notes 

Log  Has an exponential trend or variance that grows with its levels  All values in the series must be positive. 
Linear detrend  Has a linear deterministic trend that can be identified using least squares  When Econometric Modeler detrends the series, it ignores leading or trailing missing ( If any missing values occur between observed values, then the app returns a vector of 
Firstorder difference  Has a stochastic trend  Econometric Modeler prepends the differenced series with a NaN value. This action ensures that the differenced series has the same length and time base as the original series. 
Seasonal difference  Has a seasonal, stochastic trend  You can specify the period in a season using the spin box. For example, Econometric Modeler prepends the differenced series with 
For more details, see Data Transformations.
To transform a variable, select the variable in the Data Browser, then click a transformation. After you transform a series, a new variable representing the transformed series appears in the Data Browser. Also, Econometric Modeler plots and selects the new variable. To create the variable name, the app appends the transformation name to the end of the variable name. You can rename the transformed variable by rightclicking it in the Data Browser, selecting Rename in the context menu, then entering the new name. You can select multiple series by pressing Ctrl and clicking each series, and then apply the same transformation to the selected series simultaneously. The app creates new variables for each series, appends the transformation name to the end of each transformed variable name, and plots the transformed variables in the same figure.
For example, suppose that the GDP series in Data_USEconModel
has an exponential trend and a stochastic trend. Stabilize the GDP by applying the log transformation and then applying the second difference.
Import the DataTable
variable in the Data_USEconModel
data set into the Econometric Modeler (see Import Time Series Variables).
In the Data Browser, select GDP
.
On the Econometric Modeler tab, in the Transforms section, click Log. The app creates a variable named GDPLog
, which appears in the Data Browser, and displays a plot for the time series.
In the Transforms section, click Difference. The app creates a variable named GDPLogDiff
and displays a plot for the time series.
In the Transforms section, click Difference. The app creates a variable called GDPLogDiffDiff
and displays a plot for the time series.
GDPLogDiffDiff
is the stabilized GDP.
The results of an exploratory data analysis can suggest several candidate models. To choose a model, in the Data Browser, select a time series variable for the response, then, on the Econometric Modeler tab, in the Models section, click a model or click one in the models gallery. Econometric Modeler supports the following models.
Model  Type 

Conditional mean: ARMA/ARIMA Models section  Stationary autoregressive (AR) For details, see Autoregressive Model, 
Stationary moving average (MA) For details, see Moving Average Model,  
Stationary ARMA For details, see Autoregressive Moving Average Model,  
Nonstationary, integrated ARMA (ARIMA) For details, see ARIMA Model,  
Seasonal (Multiplicative) ARIMA (SARIMA) For details, see Multiplicative ARIMA Model,  
ARIMA including exogenous predictors (ARIMAX) For details, see ARIMA Model Including Exogenous Covariates,  
Seasonal ARIMAX  
Conditional variance: GARCH Models section  Generalized autoregressive conditional heteroscedastic (GARCH) For details, see GARCH Model, 
Exponential GARCH (EGARCH) For details, see EGARCH Model,  
Glosten, Jagannathan, and Runkle (GJR)  
Multiple linear regression: Regression Models section  Multiple linear regression For details, see Time Series Regression I: Linear Models, 
Regression model with ARMA errors For details, see Regression Models with Time Series Errors, 
For conditional mean model estimation, SARIMA and SARIMAX are the most flexible models. You can create any conditional mean model that excludes exogenous predictors by clicking SARIMA, or you can create any conditional mean model that includes at least one exogenous predictor by clicking SARIMAX.
After you select a model, the app displays the Type
Model
Parameters dialog box, where Type
is the model
type. This figure shows the SARIMAX Model Parameters dialog box.
Adjustable parameters in the Type
Model Parameters window depend on Type
. In general, adjustable parameters include:
A model constant (offset or intercept) and linear regression coefficients corresponding to predictor variables (see Adjusting Model Constant and Regression Component Parameters)
Time series component parameters, which include seasonal and nonseasonal lags and degrees of integration (see Adjusting Time Series Component Parameters)
The innovation distribution (see Adjusting Innovation Distribution Parameters)
As you adjust parameter values, the equation in the Model Equation section changes to match your specifications. Adjustable parameters correspond to input and namevalue pair arguments described in corresponding model creation reference pages. For details, see the function reference page for a specific model. Regardless of the model you choose, all coefficients in the model are unknown and estimable, including the tdistribution degrees of freedom parameter (when you specify a t innovation distribution).
Note
Econometric Modeler does not support:
Optimization option adjustments for estimation.
Composite conditional mean and variance models. For details, see Specify Conditional Mean and Variance Models.
Applying equality constraints to specified parameters during estimation (except for holding parameters fixed at zero during estimation).
To adjust optimization options, estimate composite conditional mean and variance models, or apply equality constraints, use the MATLAB command line.
To include a model constant (offset or intercept) term, select the Include Constant Term or Include Offset Term check box. To remove the model constant (that is, constrain it to zero during estimation), clear the check box. The location and type of the check box in the Type
Model Parameters dialog box depends on the model type. By default, Econometric Modeler includes a model constant in all model types except conditional variance models.
To select predictors for the regression component, in the Predictors list, select the check box in the Include? column corresponding to the predictors you want to include in the model. By default, the app does not include a regression component in any model type.
If you select ARIMAX, SARIMAX, or RegARMA, then you must choose at least one predictor.
If you select MLR, then you can specify one of the following:
An MLR model when you choose at least one predictor
A constant mean model (interceptonly model) when you clear all check boxes in the Include? column and select the Include Intercept check box
An erroronly model when you clear all check boxes in the Include? column and clear the Include Intercept check box
Consider a linear regression model of GDP onto CPI and the unemployment rate. To specify the regression:
Import the DataTable
variable in the Data_USEconModel
data set into the Econometric Modeler (see Import Time Series Variables).
In the Data Browser, select the response variable GDP
.
On the Econometric Modeler tab, in the Models section, click the arrow to display the models gallery.
In the models gallery, in the Regression Models section, click MLR.
In the MLR Model Parameters dialog box, in the Include? column, select the CPIAUCSL and UNRATE check boxes.
Click the Estimate button.
In general, time series component parameters contain lags to include in the seasonal and nonseasonal lag operator polynomials, and seasonal and nonseasonal degrees of integration.
For conditional mean models, you can specify seasonal and nonseasonal autoregressive lags, and seasonal and nonseasonal moving average lags. You can also adjust seasonal and nonseasonal degrees of integration.
For conditional variance models, you can specify ARCH and GARCH lags. EGARCH and GJR models also support leverage lags.
For regression models with ARMA errors, you can specify nonseasonal autoregressive and moving average lags. For models containing seasonal lags or degrees of seasonal or nonseasonal integration, use the command line instead.
Econometric Modeler supports two options to adjust the parameters. The adjustment options are on separate tabs of the Type
Model Parameters dialog box: the Lag Order and Lag Vector tabs. On the Lag Order tab, you can specify the orders of lag operator polynomials. This feature enables you to include all lags efficiently, from 1 through the specified order, in a lag operator polynomial. On the Lag Vector tab, you can specify the individual lags that comprise a lag operator polynomial. This feature is well suited for creating flexible models. For more details, see Specifying Lag Operator Polynomials Interactively.
For all models, you can specify that the distribution of the innovations is Gaussian. For all models, except multiple linear regression models, you can specify the Student's t instead to address leptokurtic innovation distributions (for more details, see Maximum Likelihood Estimation for Conditional Mean Models, Maximum Likelihood Estimation for Conditional Variance Models, or Maximum Likelihood Estimation of regARIMA Models). If you specify the t distribution, then Econometric Modeler estimates its degrees of freedom parameter using maximum likelihood.
By default, Econometric Modeler uses the Gaussian distribution for the innovations. To change the innovation distribution, in the Type
Model Parameters dialog box, from the Innovation Distribution button, select a distribution in the list.
Econometric Modeler treats all parameters in the model as unknown and estimable. After you specify a model, fit it to the data by clicking Estimate in the Type
Model Parameters dialog box.
Note
Econometric Modeler requires initial values for estimable parameters and presample observations to initialize the model for estimation. Econometric Modeler always chooses the default initial and presample values as described in the estimate
reference page of the model you want to estimate.
If Econometric Modeler issues an error during estimation, then:
The specified model poorly describes the data. Adjust model parameters, then estimate the new model.
At the command line, adjust optimization options and estimate the model. For details, see Optimization Settings for Conditional Mean Model Estimation, Optimization Settings for Conditional Variance Model Estimation, or Optimization Settings for regARIMA Model Estimation.
After you estimate a model:
A new variable that describes the estimated model appears in the Models section of the Data Browser with the name Type_response
. Type
is the model type and response
is the response variable to which Econometric Modeler fit the model, for example, ARIMA_FEDFUNDS
.
You operate on an estimated model in the Data Browser by rightclicking it. In addition to the options available for time series variables (see Import Time Series Variables), the context menu includes the Modify
option, which enables you to modify and reestimate a model. For example, rightclick a model and select Modify
. Then, in the Type
Model Parameters dialog box, adjust parameters and click Estimate.
The Model Summary(Type_response
) document summarizing the estimation results appears in the right pane. Results shown depend on the model type. For conditional mean and regression models, results include:
Model Fit — A time series plot of the response series and the fitted values $$\widehat{y}$$
Parameters — An estimation summary table containing parameter estimates, standard errors, and t statistics and pvalues for testing the null hypothesis that the corresponding parameter is 0
Residual Plot — A time series plot of the residuals
Goodness of Fit — Akaike information criterion (AIC) and Bayesian information criterion (BIC) model fit statistics
For conditional variance models, the results also include an estimation summary table and goodnessoffit statistics, but Econometric Modeler plots:
Conditional Variances — A time series plot of the inferred conditional variances $${\widehat{\sigma}}_{t}^{2}$$
Standardized Residuals — A time series plot of the standardized residuals $$\frac{{y}_{t}c}{{\widehat{\sigma}}_{t}^{2}}$$, where c is the estimated offset
You can interact with individual plots by pausing on one and selecting an interaction (see Visualizing Time Series Data). You can also interact with the summary by rightclicking the document. Options include:
Export — Place plot in a separate figure window.
Show Model — Display the summary of another estimated model by pointing to Show Model, then selecting a model in the list.
Show Recessions — Plot recession bands in time series plots.
Consider a SARIMA(0,1,1)×(0,1,1)_{12} for the monthly international airline passenger numbers from 1949 to 1960 in the Data_Airline
data set. To estimate this model using the Econometric Modeler:
Import the DataTable
variable in the Data_Airline
data set into Econometric Modeler (see Import Time Series Variables).
On the Econometric Modeler tab, in the Models section, click the arrow > SARIMA.
In the SARIMA Model Parameters dialog box, on the Lag Order tab:
Nonseasonal section
Set Degrees of Integration to
1
.
Set Moving Average Order to
1
.
Clear the Include Constant Term check box.
Seasonal section
Set Period to 12
to
indicate monthly data.
Set Moving Average Order to
1
.
Select the Include Seasonal Difference check box.
Click Estimate.
A variable named SARIMA_PSSG
appears in the Models section of the Data Browser, and this estimation summary appears in the new Model Summary(SARIMA_PSSG) document.
After you estimate a model, a good practice is to determine the adequacy of the fitted model (see Goodness of Fit). Econometric Modeler is well suited for visually assessing the insample fit (for all models except conditional variance models) and performing residual diagnostics.
Residual diagnostics include evaluating the model assumptions and investigating whether you must respecify the model to address other properties of the data. Model assumptions to assess include checking whether the residuals are centered on zero, normally distributed, homoscedastic, and serially uncorrelated. If the residuals do not demonstrate all these properties, then you must determine the severity of the departure, whether to transform the data, and whether to specify a different model. For more details on residual diagnostics, see Time Series Regression VI: Residual Diagnostics and Residual Diagnostics.
To perform goodnessoffit checks using Econometric Modeler, in the Models section of the Data Browser, select an estimated model. Then complete the following steps:
To visually assess the insample fit for all models (except conditional variance models), inspect the Model Fit plot in the Model Summary document.
To visually assess whether the residuals are centered on zero, autocorrelated, and heteroscedastic, inspect the Residual Plot in the Model Summary document.
On the Econometric Modeler tab, in the Diagnostics section, click Residual Diagnostics. The diagnostics gallery provides these residual plots and tests.
Method  Diagnostic 

Residual histogram  Visually assess normality 
Residual quantilequantile plot  Visually assess normality and skewness 
ACF  Visually assess whether residuals are autocorrelated 
LjungBox Qtest  Test residuals for significant autocorrelation 
ACF of squared residuals  Visually assess whether residuals have conditional heteroscedasticity 
Engle's ARCH test  Test residuals for conditional heteroscedasticity (significant ARCH effects) 
Alternatively, to plot a histogram, quantilequantile plot, or ACF of the residuals of an estimated model:
Select a model in the Data Browser.
Click the Plots tab.
In the Plots section, click the arrow and then click one of the plots in the Model Plots section of the gallery.
Note
Another important goodnessoffit check is predictiveperformance assessment. To assess the predictive performance of several models:
Fit a set of models to the data using Econometric Modeler.
Perform residual diagnostics on all models.
Choose a subset of models with desirable residual properties and minimal fit statistics (see Finding Model with Best InSample Fit).
Export the chosen models to the MATLAB Workspace (see Export Session Results).
Perform a predictive performance assessment at the command line (see Assess Predictive Performance).
For an example, see Compare Predictive Performance After Creating Models Using Econometric Modeler App.
Consider performing goodnessoffit checks on the estimated SARIMA(0,1,1)×(0,1,1)_{12} model for the airline counts data in Estimating a Model.
In the right pane, on the Model Summary(SARIMA_PSSG) document:
Model Fit suggests that the model fits to the data fairly well.
Residual Plot suggests that the residuals have a mean of zero. However, the residuals appear heteroscedastic and serially correlated.
On the Econometric Modeler tab, in the Diagnostics section, click Residual Diagnostics. In the diagnostics gallery:
Click Residual QQ Plot. The right pane display a figure window named QQPlot(SARIMA_PSSG) containing a quantilequantile plot of the residuals.
The plot suggests that the residuals are approximately normal, but with slightly heavier tails.
Click Autocorrelation Function. In the toolstrip, the ACF tab appears and contains plot options. The right pane displays a figure window named ACF(SARIMA_PSSG) containing the ACF of the residuals.
Because almost all the sample autocorrelation values are below the confidence bounds, the residuals are likely not serially correlated.
Click Engle's ARCH Test. On the ARCH tab, in the Tests section, click Run Test to run the test using default options. The right pane displays the ARCH(SARIMA_PSSG) document, which shows the test results in the Results table.
The results suggest rejection of the null hypothesis that the residuals exhibit no ARCH effects at a 5% level of significance. You can try removing heteroscedasticity by applying the log transformation to the series.
Econometric Modeler enables you to fit multiple related models to a data set efficiently. After you estimate a model, you can estimate other models by iterating the methods in Perform Exploratory Data Analysis, Fitting Models to Data, and Conducting GoodnessofFit Checks. After each iteration, a new model variable appears in the Models section of the Data Browser.
For models in the same parametric family that you fit to the same response series, you can determine the model with the best parsimonious, insample fit among the estimated models by comparing their fit statistics. From a subset of candidate models, to determine the model of best fit using Econometric Modeler:
In the Models section of the Data Browser, doubleclick an estimated model. In the right pane, estimation results of the model appear in the Model Summary(Model
) document, where Model
is the name of the selected model.
On the Model Summary(Model
) document, in the Goodness of Fit table, choose a fit statistic (AIC or BIC) and record its value.
Iterate the previous steps for all candidate models.
Choose the model that yields the minimal fit statistic.
For more details on goodnessoffit statistics, see Information Criteria for Model Selection.
Consider finding the bestfitting SARIMA model, with a period of 12, for the log of the airline passenger counts in the Data_Airline
data set. Fit a subset of SARIMA models, considering all combinations of models that include up to two seasonal and nonseasonal MA lags.
Import the DataTable
variable in the Data_Airline
data set into Econometric Modeler (see Import Time Series Variables).
Apply the log transformation to PSSG
(see Transforming Time Series).
Fit a SARIMA(0,1,q)×(0,1,q_{12})_{12} to PSSGLog
, where all unknown orders are 0 (see Estimating a Model).
In the right pane, on the Model Summary(SARIMA_PSSGLog) document, in the Goodness of Fit table, record the AIC value.
In the Data Browser, select PSSGLog
.
Iterate steps 4 and 5, but adjust q and q_{12} to cover the nine permutations of q ∈ {0
,1
,2
} and q_{12} ∈ {0
,1
,2
}. Econometric Modeler distinguishes subsequent models of the same type by appending consecutive digits to the end of the variable name.
The resulting AIC values are in this table.
Model  Variable Name  AIC 

SARIMA(0,1,0)×(0,1,0)_{12}  SARIMA_PSSGLog1  491.8042 
SARIMA(0,1,0)×(0,1,1)_{12}  SARIMA_PSSGLog2  530.5327 
SARIMA(0,1,0)×(0,1,2)_{12}  SARIMA_PSSGLog3  528.5330 
SARIMA(0,1,1)×(0,1,0)_{12}  SARIMA_PSSGLog4  508.6853 
SARIMA(0,1,1)×(0,1,1)_{12}  SARIMA_PSSGLog5  546.3970 
SARIMA(0,1,1)×(0,1,2)_{12}  SARIMA_PSSGLog6  544.6444 
SARIMA(0,1,2)×(0,1,0)_{12}  SARIMA_PSSGLog7  506.8027 
SARIMA(0,1,2)×(0,1,1)_{12}  SARIMA_PSSGLog8  544.4789 
SARIMA(0,1,2)×(0,1,2)_{12}  SARIMA_PSSGLog9  542.7171 
Because it yields the minimal AIC, the SARIMA(0,1,1)×(0,1,1)_{12} model is the model with the best parsimonious, insample fit.
Econometric Modeler offers several options for you to share your session results. The option you choose depends on your analysis goals.
The options for sharing your results are in the Export section of the Econometric Modeler tab. This table describes the available options.
Option  Description 

Export Variables  Export time series and model variables to the MATLAB Workspace. Choose this option to perform further analysis at the MATLAB command line. For example, you can generate forecasts from an estimated model or check the predictive performance of several models. 
Generate Function  Generate a MATLAB function to use outside the app. The function accepts the data loaded into the app as input, and outputs a model estimated in the app session. Choose this option to:

Generate Live Function  Generate a MATLAB live function to use outside the app. The function accepts the data loaded into the app as input, and outputs a model estimated in the app session. Choose this option to:

Generate Report  Generate a report that summarizes the session. Choose this option when you achieve your analysis goals in Econometric Modeler, and you want to share a summary of the results. 
To export time series and estimated model variables from the Data Browser to the MATLAB Workspace:
On the Econometric Modeler tab, in the Export section, click or Export > Export Variables.
In the Export Variables dialog box, all time series variables in the Data Browser appear in the left pane and all model variables appear in the right pane. Choose time series and model variables to export by selecting the corresponding check boxes in the Select column. The app selects the check box of all time series or model variables that are selected in the Data Browser. Clear any check boxes for variables to you do not want to export. For example, this figure shows how to select the PSSGLog
time series and the SARIMA_PSSGLog
SARIMA model.
Click Export.
The selected variables appear in the MATLAB Workspace. Time series variables are doubleprecision column vectors. Estimated models are objects of type depending on the model (for example, an exported ARIMA model is an arima
object).
Alternatively, you can export variables from the Data Browser by selecting at least one variable, rightclicking a selected variable, and selecting Export.
The app can generate a plain text function or a live function. The main difference between the two functions is the editor used to modify the generated function: you edit plain text functions in the MATLAB editor and live functions in the Live Editor. For more details on the differences between the two function types, see What Is a Live Script or Function?.
Regardless of the function type you choose, the generated function accepts the data loaded into the app as input, and outputs a model estimated in the app session. To export a MATLAB function or live function that creates a model estimated in an app session:
In the Data Browser, select an estimated model.
On the Econometric Modeler tab, in the Export section, click Export. In the Export menu, choose Generate Function or Generate Live Function.
The MATLAB Editor or Live Editor displays an untitled, unsaved function containing the code that estimates the model.
By default, the function name is modelTimeSeries
.
The function accepts the originally imported data set as input.
Before the function estimates the model, it extracts the variables from the input data set used in estimation, and applies the same transformations to the variables that you applied in Econometric Modeler.
The function returns the selected estimated model.
Consider generating a live function that returns SARIMA_PSSGLog
, the SARIMA(0,1,1)×(0,1,1)_{12} model fit to the log of airline passenger data (see Estimating a Model). This figure shows the generated live function.
Econometric Modeler can produce a report describing your activities on selected time series and model variables. The app organizes the report into chapters corresponding to selected time series and model variables. Chapters describe session activities that you perform on the corresponding variable.
Chapters on time series variables describe transformations, plots, and tests that you perform on the selected variable in the session. Estimated model chapters contain an estimation summary, that is, elements of the Model Summary document (see Estimating a Model), and residual diagnostics plots and tests.
You can export the report as one of the following document types:
Hypertext Markup Language (HTML)
Microsoft^{®} Word XML Format Document (DOCX)
Portable Document Format (PDF)
To export a report:
On the Econometric Modeler tab, in the Export section, click Export > Generate Report.
In the Select items to include in report dialog box, all time series variables in the Data Browser appear in the left pane and all model variables appear in the right pane. Choose variables to include the report by selecting their check boxes in the Select column.
Select a document type by clicking Report Format and selecting the format you want.
Click OK.
In the Select File to Write window:
Browse to the folder in which you want to save the report.
In the File name box, type a name for the report.
Click Save.
Consider generating an HTML report for the analysis of the airline passenger data (see Conducting GoodnessofFit Checks). This figure shows how to select all variables and the HTML format.
This figure shows a sample of the generated report.
[1] Box, George E. P., Gwilym M. Jenkins, and Gregory C. Reinsel. Time Series Analysis: Forecasting and Control. 3rd ed. Englewood Cliffs, NJ: Prentice Hall, 1994.