docstr: Return Pearson's X^2 estimate of scale.
docstr_tok: ["Return","Pearson","'s","X^2","estimate","of","scale","."]
code: def estimate_scale(self, Y=None, results=None):
      """
      Return Pearson\'s X^2 estimate of scale.
      """
  
      if results is None:
          results = self.results
      if Y is None:
          Y = self.Y
      resid = Y - results.mu
      return (
          np.power(resid, 2) / self.family.variance(results.mu)
      ).sum() / results.df_resid
  
file_path: nipy/nipy/algorithms/statistics/models/glm.py
imports: import numpy
  from .None import family
  from .regression import WLSModel
label_desc: Use image node_id 6 for calling the Model obj's underlying member method code with example usage: obj.estimate_scale(Y, results) and returns: unknown