CSSM Procedure

Model Specification Steps

To illustrate the model specification steps, suppose y is a response variable and variables x1 and x2 are predictors. The following statements specify a model for y that includes two components named cycle and randomWalk, predictors x1 and x2, and an observation disturbance named whiteNoise:

parms lambda / lower=(1.e-6) upper=(3.14);
parms cycleVar / lower=(1.e-6);
array cycleT{4} c1-c4;
c1 = cos(lambda);
c2 = sin(lambda);
c3 = -c2;
c4 = c1;
state s_cycle(2) T(g)=(cycleT) cov(I)=(cycleVar) a1(2);
component cycle=(1 0)*s_cycle;
trend randomWalk(rw);
irregular whiteNoise;
model y = x1 x2 randomWalk cycle whiteNoise;

The specification begins with a PARMS statement that defines two parameters, lambda and cycleVar, along with their lower and upper bounds (essentially 0 and pi for lambda, and 0 and infinity for cycleVar). Next, programming statements define an array of variables, cycleT, which contains four variables, c1–c4; these variables are used later for defining the elements of the transition matrix of a state subsection. The STATE statement specifies the two-dimensional subsection s_cycle; the dimension appears within the parentheses after the name (s_cycle(2)). The T= option specifies the transition matrix for the s_cycle (T(g)=(cycleT)); the g in T(g) signifies that the form of the T matrix is general. The COV= option (cov(I)=(cycleVar)) specifies the covariance of the state disturbance (bold upper Q Subscript t for t greater-than-or-equal-to 2); because of the use of I in cov(I), the covariance is of the form scaled identity, essentially a two-dimensional diagonal matrix with both diagonal elements equal to cycleVar. The initial condition for s_cycle is completely diffuse because the A1= option, which specifies bold upper A bold 1, specifies that the dimension of the diffuse vector delta delta is 2: a1(2). In this case there is no need to specify the covariance bold upper Q 1 in the initial condition. The COMPONENT statement specifies the component cycle. It specifies cycle as a dot product of two vectors—left-parenthesis 1 0 right-parenthesis and s_cycle, which merely selects the first element of s_cycle: component cycle=(1 0)*s_cycle. The TREND statement defines a component named randomWalk; its type is rw, which signifies random walk. The IRREGULAR statement defines an observation disturbance named whiteNoise. Both the randomWalk and whiteNoise specifications are only partially complete—for example, the disturbance variance of whiteNoise is not specified. These unspecified variances, trendVar, which corresponds to randomWalk, and wnVar, which corresponds to whiteNoise, are automatically included in the list of unknown parameters, theta theta, along with the parameters that are defined by the PARMS statements. Thus, the parameter vector for this model is theta theta equals left-parenthesis sans-serif l sans-serif a sans-serif m sans-serif b sans-serif d sans-serif a sans-serif c sans-serif y sans-serif c sans-serif l sans-serif e sans-serif upper V sans-serif a sans-serif r sans-serif t sans-serif r sans-serif e sans-serif n sans-serif d sans-serif upper V sans-serif a sans-serif r sans-serif w sans-serif n sans-serif upper V sans-serif a sans-serif r right-parenthesis. Finally, the model specification is completed by the MODEL statement, which specifies the components of the observation equation: the response variable y, the predictors x1 and x2, the components randomWalk and cycle, and the irregular term whiteNoise.

The preceding statements result in an SSM with a three-dimensional state vector, which is the result of combining the two-dimensional state subsection, s_cycle, and a one-dimensional subsection underlying the trend, randomWalk. In this specification, the initial state is completely diffuse with bold upper Q 1 a null matrix, and bold upper A bold 1 equal to the three-dimensional identity. The other state system matrices bold upper T Subscript t and bold upper Q Subscript t are time-invariant:

bold upper T equals Start 3 By 3 Matrix 1st Row 1st Column cosine left-parenthesis normal l normal a normal m normal b normal d normal a right-parenthesis 2nd Column sine left-parenthesis normal l normal a normal m normal b normal d normal a right-parenthesis 3rd Column 0 2nd Row 1st Column minus sine left-parenthesis normal l normal a normal m normal b normal d normal a right-parenthesis 2nd Column cosine left-parenthesis normal l normal a normal m normal b normal d normal a right-parenthesis 3rd Column 0 3rd Row 1st Column 0 2nd Column 0 3rd Column 1 EndMatrix bold upper Q equals Start 3 By 3 Matrix 1st Row 1st Column cycleVar 2nd Column 0 3rd Column 0 2nd Row 1st Column 0 2nd Column cycleVar 3rd Column 0 3rd Row 1st Column 0 2nd Column 0 3rd Column trendVar EndMatrix

The observation equation is obvious with bold upper Z equals left-bracket 1 0 1 right-bracket.

Last updated: July 09, 2026