code: def test_k_factor1(reset_randomstate):
      # Fitted parameters for np.random.seed(1234) replicate the true parameters
      # pretty well (flipped signs on loadings are just from usual factor sign
      # identification issue):
      #                       True  Fitted
      # loading.0->0          1.00   -0.98
      # loading.0->1         -0.75    0.75
      # loading.0)->2         0.25   -0.24
      # loading.0->3         -0.30    0.31
      # L1.0->0               0.50    0.50
      # sigma2.0             10.00   10.07
      # sigma2.1             10.00   10.06
      # sigma2.2             10.00    9.94
      # sigma2.3             10.00   11.60
      np.random.seed(1234)
      endog_M, endog_Q, _, _, true_params, _ = simulate_k_factor1(
          nobs=100000
      )
  
      mod = dynamic_factor_mq.DynamicFactorMQ(
          endog_M,
          endog_quarterly=endog_Q,
          factors=1,
          factor_orders=1,
          idiosyncratic_ar1=False,
      )
      # Fit the model with L-BFGS. Because the model doesn't impose identifying
      # assumptions on the factors, here we force identification by fixing the
      # factor error variance to be unity
      with mod.fix_params({"fb(0).cov.chol[1,1]": 1.0}):
          mod.fit(method="lbfgs", disp=False)
  
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 3 for calling a global function with example usage: test_k_factor1(reset_randomstate) without return types