class_docstr: Inherits time series methods from TSM class.
  
  **** VECTOR AUTOREGRESSION (VAR) MODELS ****
  
  Parameters
  ----------
  data : pd.DataFrame or np.array
      Field to specify the time series data that will be used.
  
  lags : int
      Field to specify how many lag terms the model will have. 
  
  integ : int (default : 0)
      Specifies how many time to difference the dependent variables.
  
  target : str (pd.DataFrame) or int (np.array)
      Specifies which column name or array index to use. By default, first
      column/array will be selected as the dependent variable.
  
  use_ols_covariance : Boolean
      If true use OLS covariance; if false use estimated covariance
class_docstr_tok: ["Inherits","time","series","methods","from","TSM","class",".","*","*","*","*","VECTOR","AUTOREGRESSION","(","VAR",")","MODELS","*","*","*","*","Parameters","--","--","--","--","--","data",":","pd.DataFrame","or","np.array","Field","to","specify","the","time","series","data","that","will","be","used",".","lags",":","int","Field","to","specify","how","many","lag","terms","the","model","will","have",".","integ",":","int","(","default",":","0",")","Specifies","how","many","time","to","difference","the","dependent","variables",".","target",":","str","(","pd.DataFrame",")","or","int","(","np.array",")","Specifies","which","column","name","or","array","index","to","use",".","By","default",",","first","column\/array","will","be","selected","as","the","dependent","variable",".","use_ols_covariance",":","Boolean","If","true","use","OLS","covariance",";","if","false","use","estimated","covariance"]
docstr: Makes dynamic in-sample predictions with the estimated model
  
  Parameters
  ----------
  h : int (default : 5)
      How many steps would you like to forecast?
  
  fit_once : boolean
      Whether to fit the model once at the beginning (True), or fit every iteration (False)
  
  fit_method : string
      Which method to fit the model with
  
  Returns
  ----------
  - pd.DataFrame with predicted values
docstr_tok: ["Makes","dynamic","in-sample","predictions","with","the","estimated","model","Parameters","--","--","--","--","--","h",":","int","(","default",":","5",")","How","many","steps","would","you","like","to","forecast","?","fit_once",":","boolean","Whether","to","fit","the","model","once","at","the","beginning","(","True",")",",","or","fit","every","iteration","(","False",")","fit_method",":","string","Which","method","to","fit","the","model","with","Returns","--","--","--","--","--","-","pd.DataFrame","with","predicted","values"]
code: def predict_is(self, h=5, fit_once=False, fit_method="OLS", **kwargs):
      """Makes dynamic in-sample predictions with the estimated model
  
      Parameters
      ----------
      h : int (default : 5)
          How many steps would you like to forecast?
  
      fit_once : boolean
          Whether to fit the model once at the beginning (True), or fit every iteration (False)
  
      fit_method : string
          Which method to fit the model with
  
      Returns
      ----------
      - pd.DataFrame with predicted values
      """
  
      iterations = kwargs.get("iterations", 1000)
  
      predictions = []
  
      for t in range(0, h):
          new_data = self.data_original.iloc[: -h + t]
          x = VAR(lags=self.lags, integ=self.integ, data=new_data)
  
          if fit_once is False:
              if fit_method == "BBVI":
                  x.fit(fit_method="BBVI", iterations=iterations)
              else:
                  x.fit(fit_method=fit_method)
  
          if t == 0:
              if fit_once is True:
                  if fit_method == "BBVI":
                      x.fit(fit_method="BBVI", iterations=iterations)
                  else:
                      x.fit(fit_method=fit_method)
                  saved_lvs = x.latent_variables
  
              predictions = x.predict(1)
          else:
              if fit_once is True:
                  x.latent_variables = saved_lvs
  
              predictions = pd.concat([predictions, x.predict(1)])
  
      # predictions.rename(columns={0:self.data_name}, inplace=True)
      predictions.index = self.index[-h:]
  
      return predictions
  
imports: import sys
  import numpy
  import pandas
  import scipy.stats
  import datetime
  from ..None import families
  from ..None import output
  from ..None import tests
  from ..None import tsm
  from ..None import data_check
  from .var_recursions import create_design_matrix, custom_covariance_matrix, var_likelihood
label_desc: Use image node_id 16 for calling the VAR obj's underlying member method code with example usage: obj.predict_is(h, fit_once, fit_method) and returns: predictions