code: def test_var_ctt():
      test = "ctt_as_exog1"
  
      # VAR(2), constant, trend, and trend**2, no exog
      # Note that this is comparing against trend as exog in the R package,
      # since it does not have a built-in option for trend**2
      results = results_var_R.res_ctt_as_exog1
      mod = varmax.VARMAX(
          endog, order=(2, 0), trend="ctt", loglikelihood_burn=2
      )
      params = results["params"]
      params = np.r_[
          params[-(6 + 9) : -6], params[: -(6 + 9)], params[-6:]
      ]
      res = mod.smooth(params)
  
      assert_allclose(res.llf, results["llf"])
  
      # Forecast
      columns = [
          "{}.fcast.{}.fcst".format(test, name)
          for name in endog.columns
      ]
      assert_allclose(
          res.forecast(10), results_var_R_output[columns].iloc[:10]
      )
  
      # IRF
      check_irf(test, mod, results, params)
  
file_path: statsmodels/statsmodels/tsa/statespace/tests/test_var.py
imports: import os
  import numpy
  from numpy.testing import assert_allclose
  import pandas
  from statsmodels.tsa.statespace import varmax
  from .results import results_var_R
label_desc: Use image node_id 7 for calling a global function with example usage: test_var_ctt() without return types