docstr: Estimate model parameters.
  
  Parameters
  ----------
  method : {'inv', 'lstsq', 'pinv'}
      Method to use when computing the the model parameters.
  
      * 'inv' - use moving windows inner-products and matrix inversion.
        This method is the fastest, but may be less accurate than the
        other methods.
      * 'lstsq' - Use numpy.linalg.lstsq
      * 'pinv' - Use numpy.linalg.pinv. This method matches the default
        estimator in non-moving regression estimators.
  cov_type : {'nonrobust', 'HCCM', 'HC0'}
      Covariance estimator:
  
      * nonrobust - The classic OLS covariance estimator
      * HCCM, HC0 - White heteroskedasticity robust covariance
  cov_kwds : dict
      Unused
  reset : int, optional
      Interval to recompute the moving window inner products used to
      estimate the model parameters. Smaller values improve accuracy,
      although in practice this setting is not required to be set.
  use_t : bool, optional
      Flag indicating to use the Student's t distribution when computing
      p-values.
  params_only : bool, optional
      Flag indicating that only parameters should be computed. Avoids
      calculating all other statistics or performing inference.
  
  Returns
  -------
  RollingRegressionResults
      Estimation results where all pre-sample values are nan-filled.
docstr_tok: ["Estimate","model","parameters",".","Parameters","--","--","--","--","--","method",":","{","'inv","'",",","'lstsq","'",",","'pinv","'","}","Method","to","use","when","computing","the","the","model","parameters",".","*","'inv","'","-","use","moving","windows","inner-products","and","matrix","inversion",".","This","method","is","the","fastest",",","but","may","be","less","accurate","than","the","other","methods",".","*","'lstsq","'","-","Use","numpy.linalg.lstsq","*","'pinv","'","-","Use","numpy.linalg.pinv",".","This","method","matches","the","default","estimator","in","non-moving","regression","estimators",".","cov_type",":","{","'nonrobust","'",",","'HCCM","'",",","'HC0","'","}","Covariance","estimator",":","*","nonrobust","-","The","classic","OLS","covariance","estimator","*","HCCM",",","HC0","-","White","heteroskedasticity","robust","covariance","cov_kwds",":","dict","Unused","reset",":","int",",","optional","Interval","to","recompute","the","moving","window","inner","products","used","to","estimate","the","model","parameters",".","Smaller","values","improve","accuracy",",","although","in","practice","this","setting","is","not","required","to","be","set",".","use_t",":","bool",",","optional","Flag","indicating","to","use","the","Student","'s","t","distribution","when","computing","p-values",".","params_only",":","bool",",","optional","Flag","indicating","that","only","parameters","should","be","computed",".","Avoids","calculating","all","other","statistics","or","performing","inference",".","Returns","--","--","--","-","RollingRegressionResults","Estimation","results","where","all","pre-sample","values","are","nan-filled","."]
code: def fit(
      self,
      method="inv",
      cov_type="nonrobust",
      cov_kwds=None,
      reset=None,
      use_t=False,
      params_only=False,
  ):
      """
      Estimate model parameters.
  
      Parameters
      ----------
      method : {'inv', 'lstsq', 'pinv'}
          Method to use when computing the the model parameters.
  
          * 'inv' - use moving windows inner-products and matrix inversion.
            This method is the fastest, but may be less accurate than the
            other methods.
          * 'lstsq' - Use numpy.linalg.lstsq
          * 'pinv' - Use numpy.linalg.pinv. This method matches the default
            estimator in non-moving regression estimators.
      cov_type : {'nonrobust', 'HCCM', 'HC0'}
          Covariance estimator:
  
          * nonrobust - The classic OLS covariance estimator
          * HCCM, HC0 - White heteroskedasticity robust covariance
      cov_kwds : dict
          Unused
      reset : int, optional
          Interval to recompute the moving window inner products used to
          estimate the model parameters. Smaller values improve accuracy,
          although in practice this setting is not required to be set.
      use_t : bool, optional
          Flag indicating to use the Student's t distribution when computing
          p-values.
      params_only : bool, optional
          Flag indicating that only parameters should be computed. Avoids
          calculating all other statistics or performing inference.
  
      Returns
      -------
      RollingRegressionResults
          Estimation results where all pre-sample values are nan-filled.
      """
      method = string_like(
          method, "method", options=("inv", "lstsq", "pinv")
      )
      reset = int_like(reset, "reset", optional=True)
      reset = self._y.shape[0] if reset is None else reset
      if reset < 1:
          raise ValueError("reset must be a positive integer")
  
      nobs, k = self._x.shape
      store = RollingStore(
          params=np.full((nobs, k), np.nan),
          ssr=np.full(nobs, np.nan),
          llf=np.full(nobs, np.nan),
          nobs=np.zeros(nobs, dtype=int),
          s2=np.full(nobs, np.nan),
          xpxi=np.full((nobs, k, k), np.nan),
          xeex=np.full((nobs, k, k), np.nan),
          centered_tss=np.full(nobs, np.nan),
          uncentered_tss=np.full(nobs, np.nan),
      )
      w = self._window
      first = self._min_nobs if self._expanding else w
      xpx, xpy, nobs = self._reset(first)
      if not (self._has_nan[first - 1] and self._skip_missing):
          self._fit_single(
              first, xpx, xpy, nobs, store, params_only, method
          )
      wx, wy = self._wx, self._wy
      for i in range(first + 1, self._x.shape[0] + 1):
          if self._has_nan[i - 1] and self._skip_missing:
              continue
          if i % reset == 0:
              xpx, xpy, nobs = self._reset(i)
          else:
              if not self._is_nan[i - w - 1] and i > w:
                  remove_x = wx[i - w - 1 : i - w]
                  xpx -= remove_x.T @ remove_x
                  xpy -= remove_x.T @ wy[i - w - 1 : i - w]
                  nobs -= 1
              if not self._is_nan[i - 1]:
                  add_x = wx[i - 1 : i]
                  xpx += add_x.T @ add_x
                  xpy += add_x.T @ wy[i - 1 : i]
                  nobs += 1
  
          self._fit_single(
              i, xpx, xpy, nobs, store, params_only, method
          )
  
      return RollingRegressionResults(
          self, store, self.k_constant, use_t, cov_type
      )
  
imports: from statsmodels.compat.numpy import lstsq
  from statsmodels.compat.pandas import Appender, Substitution, cache_readonly, call_cached_func, get_cached_doc
  from collections import namedtuple
  import numpy
  from pandas import DataFrame, MultiIndex, Series
  from scipy import stats
  from statsmodels.base import model
  from statsmodels.base.model import LikelihoodModelResults, Model
  from statsmodels.regression.linear_model import RegressionModel, RegressionResults
  from statsmodels.tools.validation import array_like, int_like, string_like
label_desc: Use image node_id 9 for calling the RollingWLS obj's underlying member method code with example usage: obj.fit(method, cov_type, cov_kwds, reset, use_t, params_only) and returns: RollingRegressionResults