SMC Procedure

MODEL Statement

  • MODEL dependent-variable ~ distribution;

The MODEL statement specifies the measurement distribution of the dependent variable given the parameters, the state variables, and the independent variables; that is, bold upper Y Subscript t Baseline tilde g Subscript bold-italic theta Baseline left-parenthesis dot vertical-bar bold upper X Subscript t minus r colon t 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, s greater-than-or-equal-to 0 comma r greater-than-or-equal-to 0 comma p greater-than-or-equal-to 1. For more information about the measurement distribution in the state space model, see the section Sequential Monte Carlo Methods and State Space Models. The MODEL statement is ignored if you specify the SUBMITMODEL statement. The MODEL statement has the following requirements if you omit the SUBMITMODEL statement:

  • The MODEL statement is required. Each dependent variable must have a corresponding AUXMODEL statement.

  • Multiple MODEL statements are permitted. When you specify multiple MODEL statements, be careful about the order of the MODEL statements if there exists dependency between dependent variables.

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

  1. Dependent variable: A single dependent variable from the input data table.

  2. Tilde: A tilde (~) symbol between the dependent 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 MODEL statements are displayed in Table 4. For the description of each distribution, see the section Standard Distributions.

    Table 4: 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
    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 MODEL statement, the variables that can appear in the expressions must be selected from the following list:

    • the model parameters

    • the current and lagged state variables

    • the current and lagged independent variables

    • the lagged dependent variables

    • the current dependent variables whose MODEL statements are specified in the preceding MODEL 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.

Moreover, the MODEL statements must satisfy the following conditions:

  • The maximum lag order of all the state variables in the distribution-arguments of all MODEL 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 MODEL statements 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 MODEL statements 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 dependent variables in all MODEL statements must not have duplicates; that is, each dependent variable should appear only once as the dependent variable in all MODEL statements.

For example, the following statement defines the measurement distribution y Subscript t Baseline equals beta exp left-parenthesis StartFraction x Subscript t Baseline Over 2 EndFraction right-parenthesis epsilon Subscript t Baseline comma epsilon Subscript t Baseline tilde Overscript iid Endscripts upper N left-parenthesis 0 comma 1 right-parenthesis:

model y ~ normal(0, beta*exp(x/2));

where y is the current dependent variable, beta is the parameter, and x is the current state variable.

The second example supposes that the measurement distributions of the state-space model are

StartLayout 1st Row  StartLayout 1st Row 1st Column y Subscript 1 comma t 2nd Column equals alpha y Subscript 1 comma t minus 1 Baseline plus exp left-parenthesis StartFraction x Subscript t Baseline Over 2 EndFraction right-parenthesis xi Subscript t Baseline comma xi Subscript t Baseline tilde Overscript iid Endscripts upper N left-parenthesis 0 comma 1 right-parenthesis 2nd Row 1st Column y Subscript 2 comma t 2nd Column equals phi y Subscript 1 comma t Baseline plus gamma exp left-parenthesis StartFraction x Subscript t minus 1 Baseline Over 2 EndFraction right-parenthesis eta Subscript t Baseline comma 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 measurement distributions:

model y1 ~ normal(alpha*y1.l1, exp(x1/2));
model y2 ~ normal(phi*y1, gamma*exp(x1.l1/2));

where alpha, phi, and gamma are parameters and y1 and y2 are current dependent variables. The first-order lagged state variable x.l1 is constructed by appending the suffix ".l1" to the current state variable x. The first-order lagged dependent variables y1.l1 is constructed by appending the suffix ".l1" to the current dependent variable y1 (see the section Method 1: Lagged Variables).

Last updated: July 09, 2026