code: def test_k_factor1_factor_order_6(reset_randomstate):
      # This tests that the model is correctly set up when the lag order of the
      # factor is longer than 5 and we have a single factor. This is important
      # because 5 lags are always present when there is quarterly data, but we
      # want to check that, for example, we haven't accidentally relied on there
      # being exactly 5 lags available.
      # Note: as of 2020/07/25, the FRBNY code does not seem to work for 6 lags,
      # so we can't test against their code
      # Note: the case with only 100 nobs leads to issues with the EM algorithm
      # and a decrease in the log-likelihood
  
      # There is a description of the results from
      # a run with nobs=10000 that are a better indication of the model finding
      # the correct parameters.
  
      endog_M, endog_Q, _ = gen_k_factor1(
          nobs=100, idiosyncratic_var=0.0
      )
  
      # Construct and fit the model
      mod = dynamic_factor_mq.DynamicFactorMQ(
          endog_M,
          endog_quarterly=endog_Q,
          factor_orders=6,
          idiosyncratic_ar1=False,
          standardize=False,
      )
      mod.fit()
  
file_path: statsmodels/statsmodels/tsa/statespace/tests/test_dynamic_factor_mq_monte_carlo.py
imports: from statsmodels.compat.pandas import QUARTER_END
  import numpy
  from numpy.testing import assert_allclose
  import pandas
  import pytest
  from scipy.signal import lfilter
  from statsmodels.tsa.statespace import dynamic_factor, dynamic_factor_mq, sarimax, varmax
label_desc: Use image node_id 7 for calling a global function with example usage: test_k_factor1_factor_order_6(reset_randomstate) without return types