class_docstr: Results class for OrderedModel
  
  This class inherits from GenericLikelihoodModelResults and not all
  inherited methods might be appropriate in this case.
docstr: probability residual
  
  Probability-scale residual is ``P(Y < y) − P(Y > y)`` where `Y` is the
  observed choice and ``y`` is a random variable corresponding to the
  predicted distribution.
  
  References
  ----------
  Shepherd BE, Li C, Liu Q (2016) Probability-scale residuals for
  continuous, discrete, and censored data.
  The Canadian Journal of Statistics. 44:463–476.
  
  Li C and Shepherd BE (2012) A new residual for ordinal outcomes.
  Biometrika. 99: 473–480
code: def resid_prob(self):
      """probability residual
  
      Probability-scale residual is ``P(Y < y) − P(Y > y)`` where `Y` is the
      observed choice and ``y`` is a random variable corresponding to the
      predicted distribution.
  
      References
      ----------
      Shepherd BE, Li C, Liu Q (2016) Probability-scale residuals for
      continuous, discrete, and censored data.
      The Canadian Journal of Statistics. 44:463–476.
  
      Li C and Shepherd BE (2012) A new residual for ordinal outcomes.
      Biometrika. 99: 473–480
  
      """
      from statsmodels.stats.diagnostic_gen import (
          prob_larger_ordinal_choice,
      )
  
      endog = self.model.endog
      fitted = self.predict()
      r = prob_larger_ordinal_choice(fitted)[1]
      resid_prob = r[np.arange(endog.shape[0]), endog]
      return resid_prob
  
imports: import warnings
  from statsmodels.compat.pandas import Appender
  import numpy
  import pandas
  from pandas.api.types import CategoricalDtype
  from scipy import stats
  from statsmodels.base.model import Model, LikelihoodModel, GenericLikelihoodModel, GenericLikelihoodModelResults
  import statsmodels.base.wrapper
  import statsmodels.regression.linear_model
  from statsmodels.tools.decorators import cache_readonly
label_desc: Use image node_id 6 for calling the OrderedResults obj's underlying member method code with example usage: obj.resid_prob() and returns: resid_prob