code: def test_ar6_no_quarterly(reset_randomstate):
      # Test to make sure that an example with > 5 lags (which are the number of
      # lags that are always included in models with quarterly data) works,
      # for the case without quarterly data
  
      # Generate test data
      ix = pd.period_range(start="1950-01", periods=1, freq="M")
      faux = pd.Series([0], index=ix)
      mod = sarimax.SARIMAX(faux, order=(6, 0, 0))
      params = np.r_[0.0, 0.0, 0.0, 0.0, 0.0, 0.5, 1.0]
      endog = mod.simulate(params, 100)
  
      # Create the baseline SARIMAX and the test Dynamic Factor MQ model
      mod_ar = sarimax.SARIMAX(endog, order=(6, 0, 0))
      mod_dfm = dynamic_factor_mq.DynamicFactorMQ(
          endog,
          factor_orders=6,
          standardize=False,
          idiosyncratic_ar1=False,
      )
  
      # Test that SARIMAX and DFM MQ produce the same loglike
      llf_ar = mod_ar.loglike(params)
      llf_dfm = mod_dfm.loglike(np.r_[1, params, 0.0])
      assert_allclose(llf_dfm, llf_ar)
  
      # Monte Carlo-type test, skipped by default
      if not SKIP_MONTE_CARLO_TESTS:
          # Test for MLE fitting: this is a Monte Carlo test, which requires a
          # large sample size; e.g., use nobs=10000 for atol=1e-2
          res_dfm = mod_dfm.fit()
          actual = res_dfm.params
          # normalize loading = 1, which requires us to multiply std. dev. of
          # factor (which is `actual[-2]`) by the estimated loading (`actual[0]`)
          actual[-2] *= actual[0]
          actual[0] = 1
          assert_allclose(res_dfm.params[1:-1], params, atol=1e-2)
  
imports: from statsmodels.compat.pandas import MONTH_END, QUARTER_END, assert_frame_equal, assert_series_equal
  import numpy
  from numpy.testing import assert_, assert_allclose, assert_equal
  import pandas
  import pytest
  from statsmodels.regression.linear_model import OLS
  from statsmodels.tools import add_constant
  from statsmodels.tsa.statespace import dynamic_factor, dynamic_factor_mq, sarimax
  from statsmodels.tsa.statespace.tests import test_dynamic_factor_mq_monte_carlo
label_desc: Use image node_id 16 for calling a global function with example usage: test_ar6_no_quarterly(reset_randomstate) without return types