BJDIFF Procedure |
@BJDIFF generates a table of Schwarz (BIC) criteria for various combinations of differencings and mean extractions, as a preliminary step in Box-Jenkins modeling. It can be used (if done carefully) to do an automated choice for the DIFFS, SDIFFS and CONSTANT options on a BOXJENK instruction.
@BJDIFF( options ) series start end
Parameters
|
series |
series to analyze |
|
start, end |
range of series to use. By default, the defined range of series. Do not adjust these for the number of differencings. |
Options
DIFF=maximum regular differencings[0]
SDIFFS=maximum seasonal differencings[0]
SPAN=seasonal span [CALENDAR seasonal]
TRANS=[NONE]/LOG/ROOT
Transformation to apply to data
WIDTH=window width for spectral smoothing [depends upon amount of data]
Description
@BJDIFF examines all combinations of 0 to DIFF regular differences, 0 to SDIFFS seasonal differences and non-zero mean or not using a common range determined by the maximum number of differencings allowed. The variance of the "stationary" part is estimated using non-parametric spectral methods and used to determine an approximate log likelihood for a particular set of differencings. This is converted into its Schwarz criterion (or BIC) where the only parameter that might be estimated is the constant.
Variables Defined
|
%%AUTOD |
recommended number of regular differencings (INTEGER) |
|
%%AUTODS |
recommended number of seasonal differencings (INTEGER) |
|
%%AUTOCONST |
recommended choice for CONST option (INTEGER) |
Example
This is the example program AUTOBOX.RPF.
cal(m) 1992:1
open data x12test.xls
data(format=xls,org=columns) 1992:1 2008:7 u11bvs
set ldata = log(u11bvs)
*
@bjdiff(diffs=2,sdiffs=1) ldata
*
@gmautofit(diffs=%%autod,sdiffs=%%autods,const=%%autoconst,report) ldata
*
boxjenk(diffs=%%autod,sdiffs=%%autods,const=%%autoconst,$
ar=%%autop,sar=%%autops,ma=%%autoq,sma=%%autoqs,$
outliers=standard,trace) ldata
Sample Output
This is the output from the example. The choice of the procedure is 1 regular, 1 seasonal, no constant, which is a common choice for seasonal data. The only close competitor is the same model with the constant.
BJDiff Table, Series LDATA
Reg Diff Seas Diff Intercept Crit
0 0 No 0.844633
0 0 Yes -5.076124
0 1 No -6.286452
0 1 Yes -6.374283
1 0 No -5.969619
1 0 Yes -5.952947
1 1 No -6.527156*
1 1 Yes -6.498573
2 0 No -5.469264
2 0 Yes -5.442213
2 1 No -6.103301
2 1 Yes -6.074705
Copyright © 2026 Thomas A. Doan