class_docstr: Fit VAR and then estimate structural components of A and B, defined:
  
  .. math:: Ay_t = A_1 y_{t-1} + \ldots + A_p y_{t-p} + B\var(\epsilon_t)
  
  Parameters
  ----------
  endog : array_like
      1-d endogenous response variable. The independent variable.
  dates : array_like
      must match number of rows of endog
  svar_type : str
      "A" - estimate structural parameters of A matrix, B assumed = I
      "B" - estimate structural parameters of B matrix, A assumed = I
      "AB" - estimate structural parameters indicated in both A and B matrix
  A : array_like
      neqs x neqs with unknown parameters marked with 'E' for estimate
  B : array_like
      neqs x neqs with unknown parameters marked with 'E' for estimate
  
  References
  ----------
  Hamilton (1994) Time Series Analysis
class_docstr_tok: ["Fit","VAR","and","then","estimate","structural","components","of","A","and","B",",","defined",":","..","math",":",":","Ay_t","=","A_1","y_","{","t-1","}","+","\\ldots","+","A_p","y_","{","t-p","}","+","B\\var","(","\\epsilon_t",")","Parameters","--","--","--","--","--","endog",":","array_like","1-d","endogenous","response","variable",".","The","independent","variable",".","dates",":","array_like","must","match","number","of","rows","of","endog","svar_type",":","str","``","A","''","-","estimate","structural","parameters","of","A","matrix",",","B","assumed","=","I","``","B","''","-","estimate","structural","parameters","of","B","matrix",",","A","assumed","=","I","``","AB","''","-","estimate","structural","parameters","indicated","in","both","A","and","B","matrix","A",":","array_like","neqs","x","neqs","with","unknown","parameters","marked","with","'","E","'","for","estimate","B",":","array_like","neqs","x","neqs","with","unknown","parameters","marked","with","'","E","'","for","estimate","References","--","--","--","--","--","Hamilton","(","1994",")","Time","Series","Analysis"]
docstr: Loglikelihood for SVAR model
  
  Notes
  -----
  This method assumes that the autoregressive parameters are
  first estimated, then likelihood with structural parameters
  is estimated
docstr_tok: ["Loglikelihood","for","SVAR","model","Notes","--","--","-","This","method","assumes","that","the","autoregressive","parameters","are","first","estimated",",","then","likelihood","with","structural","parameters","is","estimated"]
code: def loglike(self, params):
      """
      Loglikelihood for SVAR model
  
      Notes
      -----
      This method assumes that the autoregressive parameters are
      first estimated, then likelihood with structural parameters
      is estimated
      """
  
      # TODO: this does not look robust if A or B is None
      A = self.A
      B = self.B
      A_mask = self.A_mask
      B_mask = self.B_mask
      A_len = len(A[A_mask])
      B_len = len(B[B_mask])
  
      if A is not None:
          A[A_mask] = params[:A_len]
      if B is not None:
          B[B_mask] = params[A_len : A_len + B_len]
  
      nobs = self.nobs
      neqs = self.neqs
      sigma_u = self.sigma_u
  
      W = np.dot(npl.inv(B), A)
      trc_in = np.dot(np.dot(W.T, W), sigma_u)
      sign, b_logdet = slogdet(B**2)  # numpy 1.4 compat
      b_slogdet = sign * b_logdet
  
      likl = (
          -nobs
          / 2.0
          * (
              neqs * np.log(2 * np.pi)
              - np.log(npl.det(A) ** 2)
              + b_slogdet
              + np.trace(trc_in)
          )
      )
  
      return likl
  
imports: import numpy
  import numpy.linalg
  from numpy.linalg import slogdet
  from statsmodels.tools.decorators import deprecated_alias
  from statsmodels.tools.numdiff import approx_fprime, approx_hess
  import statsmodels.tsa.base.tsa_model
  from statsmodels.tsa.vector_ar.irf import IRAnalysis
  import statsmodels.tsa.vector_ar.util
  from statsmodels.tsa.vector_ar.var_model import VARProcess, VARResults
label_desc: Use image node_id 5 for calling the SVAR obj's underlying member method code with example usage: obj.loglike(params) and returns: likl