class_docstr: Inherits time series methods from TSM class.
  
  **** DYNAMIC REGRESSION MODEL ****
  
  Parameters
  ----------
  
  formula : string
      patsy string describing the regression
  
  data : pd.DataFrame
      Field to specify the data that will be used
docstr: Creates the negative log likelihood of the model
  
  Parameters
  ----------
  beta : np.array
      Contains untransformed starting values for latent variables
  
  mini_batch : int
      Size of each mini batch of data
  
  Returns
  ----------
  The negative log logliklihood of the model
docstr_tok: ["Creates","the","negative","log","likelihood","of","the","model","Parameters","--","--","--","--","--","beta",":","np.array","Contains","untransformed","starting","values","for","latent","variables","mini_batch",":","int","Size","of","each","mini","batch","of","data","Returns","--","--","--","--","--","The","negative","log","logliklihood","of","the","model"]
code: def mb_neg_loglik(self, beta, mini_batch):
      """Creates the negative log likelihood of the model
  
      Parameters
      ----------
      beta : np.array
          Contains untransformed starting values for latent variables
  
      mini_batch : int
          Size of each mini batch of data
  
      Returns
      ----------
      The negative log logliklihood of the model
      """
  
      rand_int = np.random.randint(
          low=0, high=self.data.shape[0] - mini_batch - self.max_lag + 1
      )
      sample = np.arange(start=rand_int, stop=rand_int + mini_batch)
      _, _, _, F, v = self._model(self.data[sample], beta)
  
      loglik = 0.0
      for i in range(0, len(sample)):
          loglik += np.linalg.slogdet(F[:, :, i])[1] + np.dot(
              v[i], np.dot(np.linalg.pinv(F[:, :, i]), v[i])
          )
      return -(
          -((len(sample) / 2) * np.log(2 * np.pi))
          - 0.5 * loglik.T[0].sum()
      )
  
imports: import copy
  import sys
  import numpy
  import pandas
  import scipy.stats
  from patsy import dmatrices, dmatrix, demo_data
  from ..None import families
  from ..None import tsm
  from ..None import data_check
  from .kalman import *
label_desc: Use image node_id 7 for calling the DynReg obj's underlying member method code with example usage: obj.mb_neg_loglik(beta, mini_batch) and returns: unknown