code: def state_likelihood(self, beta, alpha):
          
          _, _, _, Q = self._ss_matrices(beta)
          residuals = alpha[0][1:]-alpha[0][:-1]
          return np.sum(ss.norm.logpdf(residuals, loc=0, scale=np.power(Q.ravel(),0.5)))
docs: Returns likelihood of the states given the variance latent variables
  
          Parameters
          ----------
          beta : np.array
              Contains untransformed starting values for latent variables
          alpha : np.array
              State matrix
          
          Returns
          ----------
          State likelihood