code: def _ss_matrices(self, beta):
               
  
          T = np.identity(self.z_no-1)
          H = np.identity(1)*self.latent_variables.z_list[0].prior.transform(beta[0])       
          Z = self.X
          R = np.identity(self.z_no-1)
          
          Q = np.identity(self.z_no-1)
          for i in range(0,self.z_no-1):
              Q[i][i] = self.latent_variables.z_list[i+1].prior.transform(beta[i+1])
  
          return T, Z, R, Q, H
docs: Creates the state space matrices required
  
          Parameters
          ----------
          beta : np.array
              Contains untransformed starting values for latent variables
  
          Returns
          ----------
          T, Z, R, Q, H : np.array
              State space matrices used in KFS algorithm