Time Series Model Package
UCMSPEC Methods
UCMSPEC.AddAutoreg Method
rc=obj.AddAutoreg (<Rho, NoestRho,Variance,Noest>);
Adds an autoregressive component to a UCM model specification. You can add at most one autoregressive component to a UCM model specification.
Input Arguments
You can specify the following input arguments:
- Rho
takes a numeric value that specifies the starting value for the AR(1) coefficient during the parameter estimation process. The value of Rho must be in the interval (–1, 1]. The default is a missing value.
- NoestRho
takes a Boolean value that specifies whether the AR(1) coefficient is to be estimated (0) or fixed (1) at the specified starting value. If NoestRho is 1, a valid nonmissing Rho value must be specified. The default value is 0.
- Variance
specifies an initial value for the disturbance variance during the parameter estimation process. Any nonnegative value, including 0, is an acceptable starting value. The default is a missing value.
- Noest
takes a Boolean value that specifies whether the variance of the AR(1) noise process is to be estimated (0) or fixed (1). If Noest is 1, a valid nonmissing Variance value must be specified. The default value is 0.
UCMSPEC.AddBlockSeason Method
rc=obj.AddBlockSeason (BlockSize, NBlocks, <'Type',Offset,Variance, Noest>);
Adds a block-season component to a UCM model specification. You can use this method repeatedly to add more block-season components to a UCM model specification.
Input Arguments
You must specify the following input arguments:
- BlockSize
takes a numeric value that specifies the block size, where BlockSize can be any integer larger than or equal to 2. Typical examples of block sizes are 24 (which corresponds to the hours of the day when a day is used as a block in hourly data) or 60 (which corresponds to the minutes in an hour when an hour is used as a block in data that are recorded by minutes).
- NBlocks
takes a numeric value that specifies the number of blocks, where the NBlocks can be any integer greater than or equal to 2.
You can also specify the following input arguments:
- 'Type'
is a character string that specifies the type of the seasonal component. You can specify one of the following values:
- DUMMY
specifies a dummy type seasonal component.
- TRIG
specifies a trigonometric seasonal component.
The default is DUMMY.
- Offset
takes a numeric value that specifies the offset (the position of the first measurement within the block, if the first measurement is not at the start of a block). The Offset value must be an integer between 1 and BlockSize.
- Variance
specifies an initial value for the disturbance variance during the parameter estimation process. Any nonnegative value, including 0, is an acceptable starting value. The default is a missing value.
- Noest
takes a Boolean value that specifies whether the disturbance variance is to be estimated (0) or fixed (1). If Noest is 1, a valid nonmissing Variance value must be specified. The default value is 0.
UCMSPEC.AddComponent Method
rc=obj.AddComponent (Comp, <Variance,Noest>);
Adds a fundamental component (such as LEVEL, SLOPE, or IRREGULAR) to a UCM model specification. This method must be called separately to add each of these fundamental components. A UCM model specification cannot contain more than one instance of these fundamental components.
Input Arguments
You must specify the following input argument:
- Comp
is a character string that specifies the UCM component model. You can specify one of the following values:
- IRREGULAR
includes an irregular component in the model that corresponds to the overall random error in the model.
- LEVEL
includes a level component in the model. The level component, either by itself or together with a slope component, forms the trend component. If the slope component is absent, the resulting trend is a random walk (RW). If the slope component is present, then a locally linear trend (LLT) is obtained.
- SLOPE
includes a slope component in the model. If you specify this value, you must call the method again with the value LEVEL for the Comp argument.
You can also specify the following input arguments:
- Variance
specifies an initial value for the disturbance variance during the parameter estimation process. Any nonnegative value, including 0, is an acceptable starting value. The default is a missing value.
- Noest
takes a Boolean value that specifies whether the disturbance variance is to be estimated (0) or fixed (1). If Noest is 1, a valid nonmissing Variance value must be specified. The default value is 0.
UCMSPEC.AddCycle Method
rc=obj.AddCycle (<Period, NoestPeriod,Rho,NoestRho,Variance, Noest>);
Adds a cycle component to a UCM model specification. You can add multiple cycle components to a UCM model specification.
Input Arguments
You can specify the following input arguments:
- Period
specifies a numeric value as a starting value for the cycle period during the parameter estimation process, where Period can be any number larger than or equal to 2. The default is a missing value.
- NoestPeriod
takes a Boolean value that specifies whether the cycle period is to be estimated (0) or fixed (1) at the specified starting value. If NoestPeriod is 1, a valid nonmissing Period value must be specified. The default value is 0.
- Rho
takes a numeric value that specifies the starting value for the AR(1) coefficient during the parameter estimation process. The value of Rho must be in the interval (–1, 1]. The default is a missing value.
- NoestRho
takes a Boolean value that specifies whether the AR(1) coefficient is to be estimated (0) or fixed (1) at the specified starting value. If NoestRho is 1, a valid nonmissing Rho value must be specified. The default value is 0.
- Variance
specifies an initial value for the disturbance variance during the parameter estimation process. Any nonnegative value, including 0, is an acceptable starting value. The default is a missing value.
- Noest
takes a Boolean value that specifies whether the disturbance variance is to be estimated (0) or fixed (1). If Noest is 1, a valid nonmissing Variance value must be specified. The default value is 0.
UCMSPEC.AddDeplag Method
rc=obj.AddDeplag (LagArray, <NLag,CoeffArray,Noest>);
Adds a deplag component to a UCM model specification. You can add at most one deplag component to a UCM model specification.
Input Arguments
You must specify the following input argument:
- LagArray
specifies an integer array that defines a model with specified lags of the dependent variable included as predictors.
You can also specify the following input arguments:
- NLag
takes an integer that specifies the number of LagArray values to use. The default is all LagArray values.
- CoeffArray
is a numeric array that specifies initial coefficients for the lagged dependent variables.
- Noest
takes a Boolean value that specifies whether lag coefficients are to be estimated (0) or fixed (1). If Noest is 1, a valid nonmissing Variance value must be specified. The default value is 0.
UCMSPEC.AddInput Method
rc=obj.AddInput (XName, <Delay,DiffArray,NDiff,Transform, TransParm>);
Adds an input (predictor variable) to a UCM model specification. You can add multiple inputs to a UCM model specification.
Input Arguments
You must specify the following input argument:
- XName
is a character variable that specifies the name of the X-variable symbol.
You can also specify the following input arguments:
- Delay
takes a nonnegative integer value that specifies the lag of the X-variable in the model. If not specified, the Delay is 0.
- DiffArray
is numeric array of nonnegative integers that specifies differencing orders for the X-variable. If not specified, no differencing is applied to the predictor series.
- NDiff
takes a numeric variable that specifies the number of DiffArray values to use. If not specified, the cardinality of DiffArray is used.
- Transform
is character variable that specifies the name of a functional transform. If not specified, no transform is used.
- TransParm
takes a numeric value that specifies a transform parameter. This argument is used only for Box-Cox transformations.
UCMSPEC.AddSeason Method
rc=obj.AddSeason (Length, <'Type', Variance,Noest>);
Adds a seasonal component to a UCM model specification. You can add multiple seasonal component to a UCM model specification.
Input Arguments
You must specify the following input argument:
- Length
is a numeric variable that specifies the length of a seasonal cycle.
You can also specify the following input arguments:
- 'Type'
is a character string that specifies the type of the seasonal component. You can specify one of the following values:
- DUMMY
specifies a dummy type seasonal component.
- TRIG
specifies a trigonometric seasonal component.
The default is DUMMY.
- Variance
specifies an initial value for the disturbance variance during the parameter estimation process. Any nonnegative value, including 0, is an acceptable starting value. The default is a missing value.
- Noest
takes a Boolean value that specifies whether the disturbance variance is to be estimated (0) or fixed (1). If Noest is 1, a valid nonmissing Variance value must be specified. The default value is 0.
UCMSPEC.Close Method
rc=obj.Close ();
Finalizes the UCM model in the UCMSPEC object. This method prepares the UCM model for use in a TSM object or to be imported to a TSMSPEC object for printing or storage to a model repository catalog.
Arguments
There are no arguments associated with this method.
UCMSPEC.Open Method
rc=obj.Open ();
Opens the UCMSPEC object for configuration. This method initializes an empty UCM model.
Arguments
There are no arguments associated with this method.
UCMSPEC.SetTransform Method
rc=obj.SetTransform ('Type' <,'Option',Parm>);
Specifies the functional transform to be used by the UCM model.
Input Arguments
You must specify the following input argument:
- 'Type'
takes a string value that specifies the transform to use. You can specify one of the following values:
- AUTO
automatically chooses between NONE and LOG based on model selection criteria.
- BOXCOX(value)
requests Box-Cox transformation with a parameter value between –5 and 5. The default is BOXCOX(1).
- LOG
requests logarithmic transformation.
- LOGIT
requests logistic transformation.
- NONE
does not apply a transformation.
- SQRT
requests square-root transformation.
The default is NONE.
- 'Option'
takes a string value that specifies prediction semantics for the inverse transform. You can specify the following values:
- MEAN
requests that the inverse transform produce mean forecasts.
- MEDIAN
requests that the inverse transform produce median forecasts.
The default is MEAN.
- Parm
takes a numeric value between –5 and 5 that specifies a control parameter for the functional transform. This argument is allowed only for Box-Cox transforms.