code: def neg_loglik(self, beta):
               
          Z = np.zeros(2)
          Z[0] = 1          
          states = np.zeros([self.state_no, self.data.shape[0]])
          states[0,:] = beta[self.z_no:self.z_no+self.data.shape[0]] 
          states[1,:] = beta[self.z_no+self.data.shape[0]:] 
          parm = np.array([self.latent_variables.z_list[k].prior.transform(beta[k]) for k in range(self.z_no)]) # transformed distribution parameters
          scale, shape, skewness = self._get_scale_and_shape(parm)
          return self.state_likelihood(beta, states) + self.family.neg_loglikelihood(self.data, self.link(np.dot(Z, states)), scale, shape, skewness)
docs: Creates negative loglikelihood of the model
  
          Parameters
          ----------
          beta : np.array
              Contains untransformed starting values for latent variables
  
          Returns
          ----------
          - Negative loglikelihood