SMC Procedure

STATE Statement

  • STATE state-variable ~ distribution </ options> ;

The STATE statement specifies the transition distributions of the state variable given the parameters, the lagged state variables, the lagged and current independent variables; that is, bold upper X Subscript t Baseline tilde f Subscript bold-italic theta Baseline left-parenthesis dot vertical-bar bold upper X Subscript t minus r colon t minus 1 Baseline comma bold upper Z Subscript t minus s colon t Baseline comma bold upper Y Subscript t minus p colon t minus 1 Baseline right-parenthesis comma t greater-than 1, s greater-than-or-equal-to 0 comma r greater-than-or-equal-to 1 comma p greater-than-or-equal-to 1. For more information about the transition equation in the state space model, see the section Sequential Monte Carlo Methods and State Space Models. The STATE statement is ignored if you specify the SUBMITMODEL statement. The STATE statement has the following requirements if you omit the SUBMITMODEL statement:

  • The STATE statement is required. Each state variable must have a corresponding STATE statement.

  • Multiple STATE statements are permitted. When you specify multiple STATE statements, be careful about the order if there is any dependency between state variables.

The STATE statement must have the following components in the order shown:

  1. State variable: A single state variable that is specified in the STATEVAR statement.

  2. Tilde: A tilde (~) symbol between the state variable and the distribution.

  3. Distribution: A distribution that is specified in the form distribution-name(distribution-arguments). The available distribution-name and distribution-arguments in the STATE statements are displayed in Table 6. For the description of each distribution, see the section Standard Distributions.

    Table 6: Distribution Names and Arguments

    Distribution Name Distribution Arguments Definitions
    BETA a, b Beta distribution with arguments shape parameter a and shape parameter b
    CAUCHY l, s Cauchy distribution with arguments location l and scale s
    DEGENERATE c Degenerate distribution with argument c
    GAMMA a, b Gamma distribution with arguments shape a and scale b
    LOGN m, s Log-normal distribution with arguments mean m and standard deviation s
    NORMAL | N m, s Normal distribution with arguments mean m and standard deviation s
    POISSON lamda Poisson distribution with argument mean lamda
    T m, s, nu Student’s —t distribution with arguments mean m, standard deviation s, and degrees of freedom nu
    UNIFORM l, u Uniform distribution with arguments min l and scale u


    The distribution-arguments are specified by expressions that are enclosed in parentheses and separated by commas. Such expressions must follow any SAS programming statements. To avoid the possible computation errors, you should make some adjustments to the expressions. For more information about the adjustments, see the section Distribution Argument Restriction. The number of expressions is equal to the number of arguments of the given distribution. For the STATE statement, the variables that can appear in the expressions must be selected from the following list:

    • the model parameters

    • the lagged state variables

    • the lagged dependent variables

    • the lagged and current independent variables

    • the state variables that have been specified in the preceding STATE statements

    • the actual time index, _time

    For more information about the actual time index, see the section Time Index. For more information about the parameters, the state variables, and the dependent/independent variables, see the sections PARAMETERS Statement, STATEVAR Statement, and VAR Statement, respectively.

You can specify the following option after a forward slash (/):

PROPOSAL=proposal-dist
IMPORTANCE=proposal-dist

specifies the proposal (importance) transition distribution given the parameters, the lagged state variables, and the current dependent and independent variables for t greater-than 1; that is, bold upper X Subscript t Baseline tilde q Subscript bold-italic theta Baseline left-parenthesis bold upper X Subscript t Baseline vertical-bar bold upper X Subscript t minus r colon t minus 1 Baseline comma bold upper Y Subscript t minus p colon t Baseline comma bold upper Z Subscript t minus s colon t Baseline right-parenthesis comma t greater-than 1, s greater-than-or-equal-to 1 comma r greater-than-or-equal-to 1 comma p greater-than-or-equal-to 0. If this option is not specified, then the corresponding state variable uses the original transition distribution as its proposal transition distribution. In the SIR or APF algorithm, each state variable is sampled from its proposal transition distributions. Subsequently, the joint densities of both the original and proposal transition distributions of all the state variables are evaluated within the importance weight calculation. In the BF algorithm, the proposal transition distribution of each state variable is always the same as its original transition distribution. For more information about the proposal distribution, see the sections Sequential Importance Resampling Algorithm and Auxiliary Particle Filter. The format of the proposal-dist is proposal-dist-name(proposal-arguments). The available proposal-dist-name and proposal-arguments in the STATE statements are also displayed in Table 6.

The expressions for proposal-arguments are enclosed in parentheses and separated by commas. Such expressions must follow any SAS programming statements. To avoid the possible computation errors, you should make some adjustments to the expressions. For more information about the adjustments, see the section Distribution Argument Restriction. The number of expressions is equal to the number of arguments of the given distribution type. The variables used in the expressions for proposal-arguments must be selected from the following list:

  • the model parameters

  • the lagged state variables

  • the lagged and current dependent variables

  • the lagged and current independent variables

  • the state variables that have been specified in the preceding STATE statements

  • the actual time index, _time

Moreover, the STATE statements must satisfy the following conditions:

  • The maximum lag order of all the state variables in the distribution-arguments of all STATE statements must be less than or equal to r, where r is defined in the section Method 1: Maximum Lag Order of State Variables, r.

  • The maximum lag order of all the dependent variables in the distribution-arguments of all the STATE statements, including the PROPOSAL= option, must be less than or equal to p, where p is defined in the section Method 1: Maximum Lag Order of Dependent Variables, p.

  • The maximum lag order of all the independent variables in the distribution-arguments of all the STATE statements, including the PROPOSAL= option, must be less than or equal to s, where s is defined in the section Method 1: Maximum Lag Order of Independent Variables, s.

  • The state variables appear as the variable-name in all STATE statements must not have duplicates; that is, each state variable should appear only once as the variable-name in all STATE statements.

For example, suppose the transition equations are

StartLayout 1st Row  StartLayout 1st Row 1st Column x Subscript 1 comma t 2nd Column equals x Subscript 1 comma t minus 1 Baseline plus gamma xi Subscript t Baseline comma xi Subscript t Baseline tilde Overscript iid Endscripts upper N left-parenthesis 0 comma 1 right-parenthesis comma 2nd Row 1st Column x Subscript 2 comma t 2nd Column equals phi x Subscript 2 comma t minus 1 Baseline plus beta eta Subscript t Baseline eta Subscript t Baseline tilde Overscript iid Endscripts upper N left-parenthesis 0 comma 1 right-parenthesis comma xi Subscript t Baseline up-tack eta Subscript t Baseline EndLayout EndLayout

Then the following statements define these initialization equations:

state x1 ~ normal(x1.l1, gamma);
state x2 ~ normal(phi*x2.l1, beta);

where phi, gamma, and beta are parameters and x1 and x2 are current state variables. The first-order lagged state variables x1.l1 and x2.l1 are constructed by appending the suffix ".l1" to the current state variables x1 and x2 (see the section Method 1: Lagged Variables).

If x Subscript 1 comma t has a proposal transition equation x Subscript 1 comma 1 Baseline equals y plus gamma epsilon Subscript t Baseline comma epsilon Subscript t Baseline tilde Overscript iid Endscripts upper N left-parenthesis 0 comma gamma right-parenthesis, the transition equations can be defined by

state x1 ~ normal(x1.l, gamma) / proposal = normal(y, gamma);
state x2 ~ normal(phi*x2.l, beta);

where the state variable x1 has a proposal transition distribution that incorporates the current dependent variable y and the state variable x2 uses the original transition as its proposal transition distribution.

Last updated: July 09, 2026