# Documentation

## Explicitly Specify a State-Space Model Unknown Parameters

This example shows how to specify a time-invariant, state-space model containing unknown parameter values using ssm.

Define a state-space model containing two dependent MA(1) states, and an additive-error observation model. Symbolically, the equation is

Note that the states and are the two dependent MA(1) processes. The states and help construct the lag-one, MA effects. For example, picks up the first disturbance ( ), and picks up . In all, , which is an MA(1) with as an input.

Specify the state-transition coefficient matrix. Use NaN values to indicate unknown parameters.

A = [0 NaN NaN 0; 0 0 0 0; 0 0 0 NaN; 0 0 0 0]; 

B = [NaN 0; 1 0; 0 NaN; 0 1]; 

Specify the measurement-sensitivity coefficient matrix.

C = [1 0 0 0; 0 0 1 0]; 

Specify the observation-innovation coefficient matrix.

D = [NaN 0; 0 NaN]; 

Use ssm to define the state-space model.

Mdl = ssm(A,B,C,D) 
Mdl = State vector length: 4 Observation vector length: 2 State disturbance vector length: 2 Observation innovation vector length: 2 Sample size supported by model: Unlimited Unknown parameters for estimation: 7 State variables: x1, x2,... State disturbances: u1, u2,... Observation series: y1, y2,... Observation innovations: e1, e2,... Unknown parameters: c1, c2,... State equations: x1(t) = (c1)x2(t-1) + (c2)x3(t-1) + (c4)u1(t) x2(t) = u1(t) x3(t) = (c3)x4(t-1) + (c5)u2(t) x4(t) = u2(t) Observation equations: y1(t) = x1(t) + (c6)e1(t) y2(t) = x3(t) + (c7)e2(t) Initial state distribution: Initial state means are not specified. Initial state covariance matrix is not specified. State types are not specified. 

Mdl is an ssm model containing unknown parameters. A detailed summary of Mdl prints to the Command Window. It is good practice to verify that the state and observations equations are correct.

Pass Mdl and data to estimate to estimate the unknown parameters.

Get trial now