Setting Regression Parameters
/*--------------------------------------------------------------
SAS Sample Library
Name: x13ex08.sas
Description: Example program from SAS/ETS User's Guide,
The X13 Procedure
Title: Setting Regression Parameters
Product: SAS/ETS Software
Keys: seasonal adjustment of time series
PROC: X13
Notes:
--------------------------------------------------------------*/
data sales;
set sashelp.air;
sales = air;
date = intnx( 'month', '01sep78'd, _n_-1 );
format date monyy.;
run;
title 'Estimate Easter(25) Parameter';
proc x13 data=sales date=date MdlInfoOut=mdlout1;
var sales;
regression predefined=easter(25);
automdl;
run ;
proc print data=mdlout1;
run;
title 'Use SAS Statements to Alter Model';
proc x13 data=sales date=date MdlInfoOut=mdlout2grm;
var sales;
regression predefined=easter(25) / b=-5.029298 F;
event Saturday;
automdl;
run ;
title 'Use a SAS DATA Step to Create a MdlInfoIn= Data Set';
data plusSaturday;
_NAME_ = 'sales';
_MODELTYPE_ = 'REG';
_MODELPART_ = 'EVENT';
_COMPONENT_ = 'SCALE';
_PARMTYPE_ = 'USER';
_DSVAR_ = 'SATURDAY';
run;
data mdlin2;
set mdlout1;
if ( _DSVAR_ = 'EASTER' ) then do;
_NOEST_ = 1;
_EST_ = -5.029298;
end;
run;
proc append base=mdlin2 data=plusSaturday force;
run;
proc print data=mdlin2;
run;
title 'Use Updated Data Set to Alter Model';
proc x13 data=sales date=date MdlInfoIn=mdlin2 MdlInfoOut=mdlout2DS;
var sales;
estimate;
run ;
title 'Use SAS Statements to Alter Model';
proc x13 data=sales date=date MdlInfoOut=mdlout3grm;
var sales;
regression predefined=easter(25) / b=-5.029298 F;
event Saturday;
arima model=((3 1 1)(0 1 1));
estimate;
run ;
proc print data=mdlout3grm;
run;
proc print data=mdlout2DS;
run;
title 'Compare Results of SAS Statement Input and MdlInfoIn= Input';
proc compare base= mdlout3grm compare=mdlout2DS;
var _EST_;
run ;