NNTEST Instruction |
NNTEST(options) start end memoryvector
# list of input series in Regression Format
# list of output (or validation) series
NNTEST generates output from a neural network model. It can be used either to validate a model with in-sample data, or to forecast out-of-sample. The neural network is set up and trained using NNLEARN.
Parameters
start, end |
the range of entries for which you want to generate output. |
memoryvector |
(Required) A memory vector containing the neural net model (set by the SAVE option on NNLEARN). |
Supplementary Cards
The first supplementary card supplies the list of input series (the inputs to the network). This card supports regression format, which means you can includes leads and lags on the input series.
NNTEST will store the output generated from the model into the series listed on second supplementary card. You do not need to define these series ahead of time.
Options
SMPL=standard SMPL option [unused].
If you use the SMPL option, NNTEST will only compute output for entries where the SMPL series or formula has a non-zero value. No output will be calculated for entries where it's zero or NA.
VALIDATE/[NOVALIDATE]
If you use the VALIDATE option, NNTEST compares the output from the network with the actual data in the output series. The mean square error is computed and saved in %FUNCVAL. You can use this for automated validation of a part of the sample. If you use this, the values of output series won’t be affected.
Description
Using the neural net model specified by the memory vector parameter, NNTEST takes the supplied input series and computes the output. If you use VALIDATE, it will compare these with the data in the series listed on the supplementary card. If you don’t (by default), it will store the results in the series listed on the supplementary card.
Note that the number of input and output series must match those used on the NNLEARN to estimate the model.
Example
nntest / nnmodel
# x1 x2 x3
# ypreds
Copyright © 2025 Thomas A. Doan