class_docstr: This is a temporary base model from ETS, here I just copy everything I need
  from statespace.mlemodel.MLEModel
class_docstr_tok: ["This","is","a","temporary","base","model","from","ETS",",","here","I","just","copy","everything","I","need","from","statespace.mlemodel.MLEModel"]
docstr: Fix parameters to specific values (context manager)
  
  Parameters
  ----------
  params : dict
      Dictionary describing the fixed parameter values, of the form
      `param_name: fixed_value`. See the `param_names` property for valid
      parameter names.
  
  Examples
  --------
  >>> mod = sm.tsa.SARIMAX(endog, order=(1, 0, 1))
  >>> with mod.fix_params({'ar.L1': 0.5}):
          res = mod.fit()
docstr_tok: ["Fix","parameters","to","specific","values","(","context","manager",")","Parameters","--","--","--","--","--","params",":","dict","Dictionary","describing","the","fixed","parameter","values",",","of","the","form","`","param_name",":","fixed_value","`",".","See","the","`","param_names","`","property","for","valid","parameter","names",".","Examples","--","--","--","--",">",">",">","mod","=","sm.tsa.SARIMAX","(","endog",",","order=","(","1",",","0",",","1",")",")",">",">",">","with","mod.fix_params","(","{","'ar.L1","'",":","0.5","}",")",":","res","=","mod.fit","(",")"]
code: def fix_params(self, params):
      """
      Fix parameters to specific values (context manager)
  
      Parameters
      ----------
      params : dict
          Dictionary describing the fixed parameter values, of the form
          `param_name: fixed_value`. See the `param_names` property for valid
          parameter names.
  
      Examples
      --------
      >>> mod = sm.tsa.SARIMAX(endog, order=(1, 0, 1))
      >>> with mod.fix_params({'ar.L1': 0.5}):
              res = mod.fit()
      """
      # Initialization (this is done here rather than in the constructor
      # because param_names may not be available at that point)
      if self._fixed_params is None:
          self._fixed_params = {}
          self._params_index = OrderedDict(
              zip(self.param_names, np.arange(self.k_params))
          )
  
      # Cache the current fixed parameters
      cache_fixed_params = self._fixed_params.copy()
      cache_has_fixed_params = self._has_fixed_params
      cache_fixed_params_index = self._fixed_params_index
      cache_free_params_index = self._free_params_index
  
      # Validate parameter names and values
      all_fixed_param_names = set(params.keys()) | set(
          self._fixed_params.keys()
      )
      self._validate_can_fix_params(all_fixed_param_names)
  
      # Set the new fixed parameters, keeping the order as given by
      # param_names
      self._fixed_params.update(params)
      self._fixed_params = OrderedDict(
          [
              (name, self._fixed_params[name])
              for name in self.param_names
              if name in self._fixed_params
          ]
      )
  
      # Update associated values
      self._has_fixed_params = True
      self._fixed_params_index = [
          self._params_index[key] for key in self._fixed_params.keys()
      ]
      self._free_params_index = list(
          set(np.arange(self.k_params)).difference(
              self._fixed_params_index
          )
      )
  
      try:
          yield
      finally:
          # Reset the fixed parameters
          self._has_fixed_params = cache_has_fixed_params
          self._fixed_params = cache_fixed_params
          self._fixed_params_index = cache_fixed_params_index
          self._free_params_index = cache_free_params_index
  
imports: from collections import OrderedDict
  import contextlib
  import warnings
  import numpy
  import pandas
  from scipy.stats import norm
  from statsmodels.base.data import PandasData
  from statsmodels.tools.decorators import cache_readonly
  from statsmodels.tools.eval_measures import aic, aicc, bic, hqic
  from statsmodels.tools.sm_exceptions import PrecisionWarning
  from statsmodels.tools.numdiff import _get_epsilon, approx_fprime, approx_fprime_cs, approx_hess_cs
  from statsmodels.tools.tools import pinv_extended
  import statsmodels.tsa.base.tsa_model
  from statsmodels.tsa.statespace.tools import _safe_cond
label_desc: Use image node_id 6 for calling the StateSpaceMLEModel obj's underlying member method code with example usage: obj.fix_params(params) without return types