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: Fit the SVAR model and solve for structural parameters
  
  Parameters
  ----------
  A_guess : array_like, optional
      A vector of starting values for all parameters to be estimated
      in A.
  B_guess : array_like, optional
      A vector of starting values for all parameters to be estimated
      in B.
  maxlags : int
      Maximum number of lags to check for order selection, defaults to
      12 * (nobs/100.)**(1./4), see select_order function
  method : {'ols'}
      Estimation method to use
  ic : {'aic', 'fpe', 'hqic', 'bic', None}
      Information criterion to use for VAR order selection.
      aic : Akaike
      fpe : Final prediction error
      hqic : Hannan-Quinn
      bic : Bayesian a.k.a. Schwarz
  verbose : bool, default False
      Print order selection output to the screen
  trend, str {"c", "ct", "ctt", "n"}
      "c" - add constant
      "ct" - constant and trend
      "ctt" - constant, linear and quadratic trend
      "n" - co constant, no trend
      Note that these are prepended to the columns of the dataset.
  s_method : {'mle'}
      Estimation method for structural parameters
  solver : {'nm', 'newton', 'bfgs', 'cg', 'ncg', 'powell'}
      Solution method
      See statsmodels.base for details
  override : bool, default False
      If True, returns estimates of A and B without checking
      order or rank condition
  maxiter : int, default 500
      Number of iterations to perform in solution method
  maxfun : int
      Number of function evaluations to perform
  
  Notes
  -----
  Lütkepohl pp. 146-153
  Hamilton pp. 324-336
  
  Returns
  -------
  est : SVARResults
docstr_tok: ["Fit","the","SVAR","model","and","solve","for","structural","parameters","Parameters","--","--","--","--","--","A_guess",":","array_like",",","optional","A","vector","of","starting","values","for","all","parameters","to","be","estimated","in","A.","B_guess",":","array_like",",","optional","A","vector","of","starting","values","for","all","parameters","to","be","estimated","in","B.","maxlags",":","int","Maximum","number","of","lags","to","check","for","order","selection",",","defaults","to","12","*","(","nobs\/100",".",")","*","*","(","1.\/4",")",",","see","select_order","function","method",":","{","'ols","'","}","Estimation","method","to","use","ic",":","{","'aic","'",",","'fpe","'",",","'hqic","'",",","'bic","'",",","None","}","Information","criterion","to","use","for","VAR","order","selection",".","aic",":","Akaike","fpe",":","Final","prediction","error","hqic",":","Hannan-Quinn","bic",":","Bayesian","a.k.a",".","Schwarz","verbose",":","bool",",","default","False","Print","order","selection","output","to","the","screen","trend",",","str","{","``","c","''",",","``","ct","''",",","``","ctt","''",",","``","n","''","}","``","c","''","-","add","constant","``","ct","''","-","constant","and","trend","``","ctt","''","-","constant",",","linear","and","quadratic","trend","``","n","''","-","co","constant",",","no","trend","Note","that","these","are","prepended","to","the","columns","of","the","dataset",".","s_method",":","{","'mle","'","}","Estimation","method","for","structural","parameters","solver",":","{","'nm","'",",","'newton","'",",","'bfgs","'",",","'cg","'",",","'ncg","'",",","'powell","'","}","Solution","method","See","statsmodels.base","for","details","override",":","bool",",","default","False","If","True",",","returns","estimates","of","A","and","B","without","checking","order","or","rank","condition","maxiter",":","int",",","default","500","Number","of","iterations","to","perform","in","solution","method","maxfun",":","int","Number","of","function","evaluations","to","perform","Notes","--","--","-","L\u00fctkepohl","pp",".","146-153","Hamilton","pp",".","324-336","Returns","--","--","--","-","est",":","SVARResults"]
code: def fit(
      self,
      A_guess=None,
      B_guess=None,
      maxlags=None,
      method="ols",
      ic=None,
      trend="c",
      verbose=False,
      s_method="mle",
      solver="bfgs",
      override=False,
      maxiter=500,
      maxfun=500,
  ):
      """
      Fit the SVAR model and solve for structural parameters
  
      Parameters
      ----------
      A_guess : array_like, optional
          A vector of starting values for all parameters to be estimated
          in A.
      B_guess : array_like, optional
          A vector of starting values for all parameters to be estimated
          in B.
      maxlags : int
          Maximum number of lags to check for order selection, defaults to
          12 * (nobs/100.)**(1./4), see select_order function
      method : {'ols'}
          Estimation method to use
      ic : {'aic', 'fpe', 'hqic', 'bic', None}
          Information criterion to use for VAR order selection.
          aic : Akaike
          fpe : Final prediction error
          hqic : Hannan-Quinn
          bic : Bayesian a.k.a. Schwarz
      verbose : bool, default False
          Print order selection output to the screen
      trend, str {"c", "ct", "ctt", "n"}
          "c" - add constant
          "ct" - constant and trend
          "ctt" - constant, linear and quadratic trend
          "n" - co constant, no trend
          Note that these are prepended to the columns of the dataset.
      s_method : {'mle'}
          Estimation method for structural parameters
      solver : {'nm', 'newton', 'bfgs', 'cg', 'ncg', 'powell'}
          Solution method
          See statsmodels.base for details
      override : bool, default False
          If True, returns estimates of A and B without checking
          order or rank condition
      maxiter : int, default 500
          Number of iterations to perform in solution method
      maxfun : int
          Number of function evaluations to perform
  
      Notes
      -----
      Lütkepohl pp. 146-153
      Hamilton pp. 324-336
  
      Returns
      -------
      est : SVARResults
      """
      lags = maxlags
      if ic is not None:
          selections = self.select_order(
              maxlags=maxlags, verbose=verbose
          )
          if ic not in selections:
              raise ValueError(
                  "%s not recognized, must be among %s"
                  % (ic, sorted(selections))
              )
          lags = selections[ic]
          if verbose:
              print("Using %d based on %s criterion" % (lags, ic))
      else:
          if lags is None:
              lags = 1
  
      self.nobs = len(self.endog) - lags
  
      # initialize starting parameters
      start_params = self._get_init_params(A_guess, B_guess)
  
      return self._estimate_svar(
          start_params,
          lags,
          trend=trend,
          solver=solver,
          override=override,
          maxiter=maxiter,
          maxfun=maxfun,
      )
  
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 2 for calling the SVAR obj's underlying member method code with example usage: obj.fit(A_guess, B_guess, maxlags, method, ic, trend, verbose, s_method, solver, override, maxiter, maxfun) and returns: self