'The coefficient matrix for the state vector in the state equation.
Its dimension is r+k x r+k.
Parameters
r : int
In the context of the ARMA model r is max(p,q+1) where p is the
AR order and q is the MA order.
k : int
The number of exogenous variables in the ARMA model, including
the constant if appropriate.
p : int
The AR coefficient in an ARMA model.
References
Durbin and Koopman Section 3.7.'

@classmethod
def T(cls, params, r, k, p):

    arr = zeros((r, r), dtype=params.dtype, order='F')
    params_padded = zeros(r, dtype=params.dtype, order='F')
    params_padded[:p] = params[k:(p + k)]
    arr[:, 0] = params_padded
    arr[:(-1), 1:] = eye((r - 1))
    return arr
