class_docstr: Impacts of data revisions and news on estimates of variables of interest
  
  Parameters
  ----------
  news_results : SimpleNamespace instance
      Results from `KalmanSmoother.news`.
  model : MLEResults
      The results object associated with the model from which the NewsResults
      was generated.
  updated : MLEResults
      The results object associated with the model containing the updated
      dataset.
  previous : MLEResults
      The results object associated with the model containing the previous
      dataset.
  impacted_variable : str, list, array, or slice, optional
      Observation variable label or slice of labels specifying particular
      impacted variables to display in output. The impacted variable(s)
      describe the variables that were *affected* by the news. If you do not
      know the labels for the variables, check the `endog_names` attribute of
      the model instance.
  tolerance : float, optional
      The numerical threshold for determining zero impact. Default is that
      any impact less than 1e-10 is assumed to be zero.
  row_labels : iterable
      Row labels (often dates) for the impacts of the revisions and news.
  
  Attributes
  ----------
  total_impacts : pd.DataFrame
      Updates to forecasts of impacted variables from both news and data
      revisions, E[y^i | post] - E[y^i | previous].
  update_impacts : pd.DataFrame
      Updates to forecasts of impacted variables from the news,
      E[y^i | post] - E[y^i | revisions] where y^i are the impacted variables
      of interest.
  revision_impacts : pd.DataFrame
      Updates to forecasts of impacted variables from all data revisions,
      E[y^i | revisions] - E[y^i | previous].
  news : pd.DataFrame
      The unexpected component of the updated data,
      E[y^u | post] - E[y^u | revisions] where y^u are the updated variables.
  weights : pd.DataFrame
      Weights describing the effect of news on variables of interest.
  revisions : pd.DataFrame
      The revisions between the current and previously observed data, for
      revisions for which detailed impacts were computed.
  revisions_all : pd.DataFrame
      The revisions between the current and previously observed data,
      y^r_{revised} - y^r_{previous} where y^r are the revised variables.
  revision_weights : pd.DataFrame
      Weights describing the effect of revisions on variables of interest,
      for revisions for which detailed impacts were computed.
  revision_weights_all : pd.DataFrame
      Weights describing the effect of revisions on variables of interest,
      with a new entry that includes NaNs for the revisions for which
      detailed impacts were not computed.
  update_forecasts : pd.DataFrame
      Forecasts based on the previous dataset of the variables that were
      updated, E[y^u | previous].
  update_realized : pd.DataFrame
      Actual observed data associated with the variables that were
      updated, y^u
  revisions_details_start : int
      Integer index of first period in which detailed revision impacts were
      computed.
  revision_detailed_impacts : pd.DataFrame
      Updates to forecasts of impacted variables from data revisions with
      detailed impacts, E[y^i | revisions] - E[y^i | grouped revisions].
  revision_grouped_impacts : pd.DataFrame
      Updates to forecasts of impacted variables from data revisions that
      were grouped together, E[y^i | grouped revisions] - E[y^i | previous].
  revised_prev : pd.DataFrame
      Previously observed data associated with the variables that were
      revised, for revisions for which detailed impacts were computed.
  revised_prev_all : pd.DataFrame
      Previously observed data associated with the variables that were
      revised, y^r_{previous}
  revised : pd.DataFrame
      Currently observed data associated with the variables that were
      revised, for revisions for which detailed impacts were computed.
  revised_all : pd.DataFrame
      Currently observed data associated with the variables that were
      revised, y^r_{revised}
  prev_impacted_forecasts : pd.DataFrame
      Previous forecast of the variables of interest, E[y^i | previous].
  post_impacted_forecasts : pd.DataFrame
      Forecast of the variables of interest after taking into account both
      revisions and updates, E[y^i | post].
  revisions_iloc : pd.DataFrame
      The integer locations of the data revisions in the dataset.
  revisions_ix : pd.DataFrame
      The label-based locations of the data revisions in the dataset.
  revisions_iloc_detailed : pd.DataFrame
      The integer locations of the data revisions in the dataset for which
      detailed impacts were computed.
  revisions_ix_detailed : pd.DataFrame
      The label-based locations of the data revisions in the dataset for
      which detailed impacts were computed.
  updates_iloc : pd.DataFrame
      The integer locations of the updated data points.
  updates_ix : pd.DataFrame
      The label-based locations of updated data points.
  state_index : array_like
      Index of state variables used to compute impacts.
  
  References
  ----------
  .. [1] Bańbura, Marta, and Michele Modugno.
         "Maximum likelihood estimation of factor models on datasets with
         arbitrary pattern of missing data."
         Journal of Applied Econometrics 29, no. 1 (2014): 133-160.
  .. [2] Bańbura, Marta, Domenico Giannone, and Lucrezia Reichlin.
         "Nowcasting."
         The Oxford Handbook of Economic Forecasting. July 8, 2011.
  .. [3] Bańbura, Marta, Domenico Giannone, Michele Modugno, and Lucrezia
         Reichlin.
         "Now-casting and the real-time data flow."
         In Handbook of economic forecasting, vol. 2, pp. 195-237.
         Elsevier, 2013.
class_docstr_tok: ["Impacts","of","data","revisions","and","news","on","estimates","of","variables","of","interest","Parameters","--","--","--","--","--","news_results",":","SimpleNamespace","instance","Results","from","`","KalmanSmoother.news","`",".","model",":","MLEResults","The","results","object","associated","with","the","model","from","which","the","NewsResults","was","generated",".","updated",":","MLEResults","The","results","object","associated","with","the","model","containing","the","updated","dataset",".","previous",":","MLEResults","The","results","object","associated","with","the","model","containing","the","previous","dataset",".","impacted_variable",":","str",",","list",",","array",",","or","slice",",","optional","Observation","variable","label","or","slice","of","labels","specifying","particular","impacted","variables","to","display","in","output",".","The","impacted","variable","(","s",")","describe","the","variables","that","were","*","affected","*","by","the","news",".","If","you","do","not","know","the","labels","for","the","variables",",","check","the","`","endog_names","`","attribute","of","the","model","instance",".","tolerance",":","float",",","optional","The","numerical","threshold","for","determining","zero","impact",".","Default","is","that","any","impact","less","than","1e-10","is","assumed","to","be","zero",".","row_labels",":","iterable","Row","labels","(","often","dates",")","for","the","impacts","of","the","revisions","and","news",".","Attributes","--","--","--","--","--","total_impacts",":","pd.DataFrame","Updates","to","forecasts","of","impacted","variables","from","both","news","and","data","revisions",",","E","[","y^i","|","post","]","-","E","[","y^i","|","previous","]",".","update_impacts",":","pd.DataFrame","Updates","to","forecasts","of","impacted","variables","from","the","news",",","E","[","y^i","|","post","]","-","E","[","y^i","|","revisions","]","where","y^i","are","the","impacted","variables","of","interest",".","revision_impacts",":","pd.DataFrame","Updates","to","forecasts","of","impacted","variables","from","all","data","revisions",",","E","[","y^i","|","revisions","]","-","E","[","y^i","|","previous","]",".","news",":","pd.DataFrame","The","unexpected","component","of","the","updated","data",",","E","[","y^u","|","post","]","-","E","[","y^u","|","revisions","]","where","y^u","are","the","updated","variables",".","weights",":","pd.DataFrame","Weights","describing","the","effect","of","news","on","variables","of","interest",".","revisions",":","pd.DataFrame","The","revisions","between","the","current","and","previously","observed","data",",","for","revisions","for","which","detailed","impacts","were","computed",".","revisions_all",":","pd.DataFrame","The","revisions","between","the","current","and","previously","observed","data",",","y^r_","{","revised","}","-","y^r_","{","previous","}","where","y^r","are","the","revised","variables",".","revision_weights",":","pd.DataFrame","Weights","describing","the","effect","of","revisions","on","variables","of","interest",",","for","revisions","for","which","detailed","impacts","were","computed",".","revision_weights_all",":","pd.DataFrame","Weights","describing","the","effect","of","revisions","on","variables","of","interest",",","with","a","new","entry","that","includes","NaNs","for","the","revisions","for","which","detailed","impacts","were","not","computed",".","update_forecasts",":","pd.DataFrame","Forecasts","based","on","the","previous","dataset","of","the","variables","that","were","updated",",","E","[","y^u","|","previous","]",".","update_realized",":","pd.DataFrame","Actual","observed","data","associated","with","the","variables","that","were","updated",",","y^u","revisions_details_start",":","int","Integer","index","of","first","period","in","which","detailed","revision","impacts","were","computed",".","revision_detailed_impacts",":","pd.DataFrame","Updates","to","forecasts","of","impacted","variables","from","data","revisions","with","detailed","impacts",",","E","[","y^i","|","revisions","]","-","E","[","y^i","|","grouped","revisions","]",".","revision_grouped_impacts",":","pd.DataFrame","Updates","to","forecasts","of","impacted","variables","from","data","revisions","that","were","grouped","together",",","E","[","y^i","|","grouped","revisions","]","-","E","[","y^i","|","previous","]",".","revised_prev",":","pd.DataFrame","Previously","observed","data","associated","with","the","variables","that","were","revised",",","for","revisions","for","which","detailed","impacts","were","computed",".","revised_prev_all",":","pd.DataFrame","Previously","observed","data","associated","with","the","variables","that","were","revised",",","y^r_","{","previous","}","revised",":","pd.DataFrame","Currently","observed","data","associated","with","the","variables","that","were","revised",",","for","revisions","for","which","detailed","impacts","were","computed",".","revised_all",":","pd.DataFrame","Currently","observed","data","associated","with","the","variables","that","were","revised",",","y^r_","{","revised","}","prev_impacted_forecasts",":","pd.DataFrame","Previous","forecast","of","the","variables","of","interest",",","E","[","y^i","|","previous","]",".","post_impacted_forecasts",":","pd.DataFrame","Forecast","of","the","variables","of","interest","after","taking","into","account","both","revisions","and","updates",",","E","[","y^i","|","post","]",".","revisions_iloc",":","pd.DataFrame","The","integer","locations","of","the","data","revisions","in","the","dataset",".","revisions_ix",":","pd.DataFrame","The","label-based","locations","of","the","data","revisions","in","the","dataset",".","revisions_iloc_detailed",":","pd.DataFrame","The","integer","locations","of","the","data","revisions","in","the","dataset","for","which","detailed","impacts","were","computed",".","revisions_ix_detailed",":","pd.DataFrame","The","label-based","locations","of","the","data","revisions","in","the","dataset","for","which","detailed","impacts","were","computed",".","updates_iloc",":","pd.DataFrame","The","integer","locations","of","the","updated","data","points",".","updates_ix",":","pd.DataFrame","The","label-based","locations","of","updated","data","points",".","state_index",":","array_like","Index","of","state","variables","used","to","compute","impacts",".","References","--","--","--","--","--","..","[","1","]","Ba\u0144bura",",","Marta",",","and","Michele","Modugno",".","``","Maximum","likelihood","estimation","of","factor","models","on","datasets","with","arbitrary","pattern","of","missing","data",".","''","Journal","of","Applied","Econometrics","29",",","no",".","1","(","2014",")",":","133-160",".","..","[","2","]","Ba\u0144bura",",","Marta",",","Domenico","Giannone",",","and","Lucrezia","Reichlin",".","``","Nowcasting",".","''","The","Oxford","Handbook","of","Economic","Forecasting",".","July","8",",","2011",".","..","[","3","]","Ba\u0144bura",",","Marta",",","Domenico","Giannone",",","Michele","Modugno",",","and","Lucrezia","Reichlin",".","``","Now-casting","and","the","real-time","data","flow",".","''","In","Handbook","of","economic","forecasting",",","vol",".","2",",","pp",".","195-237",".","Elsevier",",","2013","."]
docstr: Details of forecast revisions from revisions, organized by updates
  
  Returns
  -------
  details : pd.DataFrame
      Index is as MultiIndex consisting of:
  
      - `revision date`: the date of the data revision, that results in
        `revision` that impacts the forecast of variables of interest
      - `revised variable`: the variable being revised, that results in
        `news` that impacts the forecast of variables of interest
      - `observed (prev)`: the previous value of the observation, as it
        was given in the previous dataset
      - `revised`: the value of the revised entry, as it is observed in
        the new dataset
      - `impact date`: the date of the impact on the variable of interest
      - `impacted variable`: the variable that is being impacted
  
      The columns are:
  
      - `revision`: the revision (this is `revised` - `observed (prev)`)
      - `weight`: the weight describing how the `revision` affects the
        forecast of the variable of interest
      - `impact`: the impact of the `revision` on the forecast of the
        variable of interest
  
  Notes
  -----
  This table decomposes updated forecasts of variables of interest from
  the `revision` associated with each revised datapoint from the new data
  release.
  
  This table does not summarize the impacts or show the effect of
  new datapoints, see `details_by_update` instead.
  
  Grouped impacts are shown in this table, with a "revision date" equal
  to the last period prior to which detailed revisions were computed and
  with "revised variable" set to the string "all prior revisions". For
  these rows, all columns except "impact" will be set to NaNs.
  
  This form of the details table is organized so that the revision
  dates / variables are first in the index, and in this table the index
  also contains the previously observed and revised values. This is
  convenient for displaying the entire table of detailed revisions
  because it allows sparsifying duplicate entries.
  
  However, since it includes previous observations and revisions in the
  index of the table, it is not convenient for subsetting by the variable
  of interest. Instead, the `revision_details_by_impact` property is
  organized to make slicing by impacted variables / dates easy. This
  allows, for example, viewing the details of data revisions on a
  particular variable or date of interest.
  
  See Also
  --------
  details_by_impact
  impacts
docstr_tok: ["Details","of","forecast","revisions","from","revisions",",","organized","by","updates","Returns","--","--","--","-","details",":","pd.DataFrame","Index","is","as","MultiIndex","consisting","of",":","-","`","revision","date","`",":","the","date","of","the","data","revision",",","that","results","in","`","revision","`","that","impacts","the","forecast","of","variables","of","interest","-","`","revised","variable","`",":","the","variable","being","revised",",","that","results","in","`","news","`","that","impacts","the","forecast","of","variables","of","interest","-","`","observed","(","prev",")","`",":","the","previous","value","of","the","observation",",","as","it","was","given","in","the","previous","dataset","-","`","revised","`",":","the","value","of","the","revised","entry",",","as","it","is","observed","in","the","new","dataset","-","`","impact","date","`",":","the","date","of","the","impact","on","the","variable","of","interest","-","`","impacted","variable","`",":","the","variable","that","is","being","impacted","The","columns","are",":","-","`","revision","`",":","the","revision","(","this","is","`","revised","`","-","`","observed","(","prev",")","`",")","-","`","weight","`",":","the","weight","describing","how","the","`","revision","`","affects","the","forecast","of","the","variable","of","interest","-","`","impact","`",":","the","impact","of","the","`","revision","`","on","the","forecast","of","the","variable","of","interest","Notes","--","--","-","This","table","decomposes","updated","forecasts","of","variables","of","interest","from","the","`","revision","`","associated","with","each","revised","datapoint","from","the","new","data","release",".","This","table","does","not","summarize","the","impacts","or","show","the","effect","of","new","datapoints",",","see","`","details_by_update","`","instead",".","Grouped","impacts","are","shown","in","this","table",",","with","a","``","revision","date","''","equal","to","the","last","period","prior","to","which","detailed","revisions","were","computed","and","with","``","revised","variable","''","set","to","the","string","``","all","prior","revisions","''",".","For","these","rows",",","all","columns","except","``","impact","''","will","be","set","to","NaNs",".","This","form","of","the","details","table","is","organized","so","that","the","revision","dates","\/","variables","are","first","in","the","index",",","and","in","this","table","the","index","also","contains","the","previously","observed","and","revised","values",".","This","is","convenient","for","displaying","the","entire","table","of","detailed","revisions","because","it","allows","sparsifying","duplicate","entries",".","However",",","since","it","includes","previous","observations","and","revisions","in","the","index","of","the","table",",","it","is","not","convenient","for","subsetting","by","the","variable","of","interest",".","Instead",",","the","`","revision_details_by_impact","`","property","is","organized","to","make","slicing","by","impacted","variables","\/","dates","easy",".","This","allows",",","for","example",",","viewing","the","details","of","data","revisions","on","a","particular","variable","or","date","of","interest",".","See","Also","--","--","--","--","details_by_impact","impacts"]
code: def revision_details_by_update(self):
      """
      Details of forecast revisions from revisions, organized by updates
  
      Returns
      -------
      details : pd.DataFrame
          Index is as MultiIndex consisting of:
  
          - `revision date`: the date of the data revision, that results in
            `revision` that impacts the forecast of variables of interest
          - `revised variable`: the variable being revised, that results in
            `news` that impacts the forecast of variables of interest
          - `observed (prev)`: the previous value of the observation, as it
            was given in the previous dataset
          - `revised`: the value of the revised entry, as it is observed in
            the new dataset
          - `impact date`: the date of the impact on the variable of interest
          - `impacted variable`: the variable that is being impacted
  
          The columns are:
  
          - `revision`: the revision (this is `revised` - `observed (prev)`)
          - `weight`: the weight describing how the `revision` affects the
            forecast of the variable of interest
          - `impact`: the impact of the `revision` on the forecast of the
            variable of interest
  
      Notes
      -----
      This table decomposes updated forecasts of variables of interest from
      the `revision` associated with each revised datapoint from the new data
      release.
  
      This table does not summarize the impacts or show the effect of
      new datapoints, see `details_by_update` instead.
  
      Grouped impacts are shown in this table, with a "revision date" equal
      to the last period prior to which detailed revisions were computed and
      with "revised variable" set to the string "all prior revisions". For
      these rows, all columns except "impact" will be set to NaNs.
  
      This form of the details table is organized so that the revision
      dates / variables are first in the index, and in this table the index
      also contains the previously observed and revised values. This is
      convenient for displaying the entire table of detailed revisions
      because it allows sparsifying duplicate entries.
  
      However, since it includes previous observations and revisions in the
      index of the table, it is not convenient for subsetting by the variable
      of interest. Instead, the `revision_details_by_impact` property is
      organized to make slicing by impacted variables / dates easy. This
      allows, for example, viewing the details of data revisions on a
      particular variable or date of interest.
  
      See Also
      --------
      details_by_impact
      impacts
      """
      weights = self.revision_weights.stack(
          level=[0, 1], **FUTURE_STACK
      )
  
      df = pd.concat(
          [
              self.revised_prev.rename("observed (prev)").reindex(
                  weights.index
              ),
              self.revised.reindex(weights.index),
              self.revisions.reindex(weights.index),
              weights.rename("weight"),
              (self.revisions.reindex(weights.index) * weights).rename(
                  "impact"
              ),
          ],
          axis=1,
      )
  
      if self.n_revisions_grouped > 0:
          df = pd.concat([df, self._revision_grouped_impacts])
          # Explicitly set names for compatibility with pandas=1.2.5
          df.index = df.index.set_names(
              [
                  "revision date",
                  "revised variable",
                  "impact date",
                  "impacted variable",
              ]
          )
  
      details = (
          df.set_index(["observed (prev)", "revised"], append=True)
          .reorder_levels(
              [
                  "revision date",
                  "revised variable",
                  "revised",
                  "observed (prev)",
                  "impact date",
                  "impacted variable",
              ]
          )
          .sort_index()
      )
  
      if self.impacted_variable is not None and len(df) > 0:
          details = details.loc[
              np.s_[:, :, :, :, :, self.impacted_variable], :
          ]
  
      mask = np.abs(details["impact"]) > self.tolerance
      return details[mask]
  
imports: from statsmodels.compat.pandas import FUTURE_STACK
  import numpy
  import pandas
  from statsmodels.iolib.summary import Summary
  from statsmodels.iolib.table import SimpleTable
  from statsmodels.iolib.tableformatting import fmt_params
label_desc: Use image node_id 12 for calling the NewsResults obj's underlying member method code with example usage: obj.revision_details_by_update() and returns: details