1. Home
  2. DKALMAN procedure

DKALMAN procedure

Plots vector time series (A.I. Glaser).

Options

TIMEPOINTS = variate X-coordinates for the graphs; default uses the integers 1, 2…
TITLE = texts Overall title for the graphs
YTITLE = texts Titles for the y-axes; default * forms titles automatically from the identifiers or labels of the y-variables
XTITLE = texts Title for the x-axis in each set of graphs; default * uses the identifier of TIMEPOINTS (if set)
NROWS = scalar Specifies the number of rows of graphs to appear on the graphics screen; default * takes the number of y-variables
NCOLUMNS = scalar Specifies the number of columns of graphs to appear on the graphics screen; default 1

Parameter

SAVE = pointers Save structure from KALMAN with information about the analysis; default plots information from the most recent KALMAN analysis

Description

DKALMAN plots results from an analysis by the KALMAN procedure. By default this will be from the most recent analysis, but you can use the SAVE parameter to supply results from an earlier analysis (saved using the SAVE parameter of KALMAN).

The TIMEPOINTS option supplies the time points. If this is not set (or if there are at most only two unique values), DKALMAN uses the integers 1 … n, where n is the number of time points in the analysis.

You can use the TITLE option to supply a title for the graphs. If TITLE is not set, no title is displayed.

The YTITLE option supplies a title for the y-axes; this must be set either to a text with a value for each y-variable, or one with a single value (which will then be used for all of them). You can set YTITLE='' to stop a title appearing on the y-axes. If YTITLE is not set, DKALMAN forms the titles automatically. If the Y parameter of KALMAN was set to a matrix, DKALMAN uses the column labels if available, or otherwise the column numbers. If Y was set to a pointer of variates, DKALMAN uses the identifiers of the variates if these exist outside the pointer. For example if the pointer contains variates Loss and Profit, then those identifiers will be used. If the variates have no identifiers of their own, but exist only as suffixed identifiers (e.g. Income[2010] and Income[2011] or Income['Dollar'] and Income['Euro']), then it uses the pointer suffixes (e.g. 2010 and 2011) or, if available, the labels (e.g. 'Dollar' and 'Euro').

The XTITLE option supplies a title for the x-axes; this must be set to a text with a single value. If XTITLE is not set, DKALMAN uses the identifier of the TIMEPOINTS option (if specified).

By default, the graphs are plotted in a single column, but this can be altered by using NROWS and NCOLUMNS options to specify the required number of rows and columns respectively. The graphs will be spread over several screens if the values supplied for NROWS and NCOLUMNS, are too small to include all the graphs on a single screen.

Options: TIMEPOINTS, TITLE, YTITLE, XTITLE, NROWS, NCOLUMNS.

Parameter: SAVE.

Action with RESTRICT

DATA variates must not be restricted.

See also

Procedure: KALMAN.

Commands for: Time series, Graphics.

Example

CAPTION 'KALMAN example',\
     !t('Annual flow of the river Nile at Ashwan 1871-1970. See Durbin &',\
        'Koopman (2001, Time Series Analysis by State Space',\
        'Methods, Oxford University Press).'); STYLE=meta,plain
VARIATE [VALUES=1871...1970] Year
VARIATE Nile
READ    Nile
 1120 1160  963 1210 1160 1160  813 1230 1370 1140  995  935 1110  994 1020
  960 1180  799  958 1140 1100 1210 1150 1250 1260 1220 1030 1100  774  840
  874  694  940  833  701  916  692 1020 1050  969  831  726  456  824  702
 1120 1100  832  764  821  768  845  864  862  698  845  744  796 1040  759
  781  865  845  944  984  897  822 1010  771  676  649  846  812  742  801
 1040  860  874  848  890  744  749  838 1050  918  986  797  923  975  815
 1020  906  901 1170  912  746  919  718  714  740 :
" Random walk plus noise model "
SCALAR  ytrans,yvcov,xstatetrans,xvcov; VALUE=1,0.8,1,0.1
SCALAR  m0,p0; VALUE=1,100
KALMAN  [PRINT=*] Y=Nile; YTRANSITIONMATRIX=1; YVCOVARIANCE=0.8;\
        XSTATETRANSITIONMATRIX=1; XVCOVARIANCE=0.1;\
        MEANINITIAL=0; VARINITIAL=100
DKALMAN [TIME=Year]
Updated on March 8, 2019

Was this article helpful?