class_docstr: Ordinal Model based on logistic or normal distribution
  
  The parameterization corresponds to the proportional odds model in the
  logistic case.
  The model assumes that the endogenous variable is ordered but that the
  labels have no numeric interpretation besides the ordering.
  
  The model is based on a latent linear variable, where we observe only a
  discretization.
  
  y_latent = X beta + u
  
  The observed variable is defined by the interval
  
  y = {0 if y_latent <= cut_0
       1 of cut_0 < y_latent <= cut_1
       ...
       K if cut_K < y_latent
  
  The probability of observing y=k conditional on the explanatory variables
  X is given by
  
  prob(y = k | x) = Prob(cut_k < y_latent <= cut_k+1)
                  = Prob(cut_k - x beta < u <= cut_k+1 - x beta
                  = F(cut_k+1 - x beta) - F(cut_k - x beta)
  
  Where F is the cumulative distribution of u which is either the normal
  or the logistic distribution, but can be set to any other continuous
  distribution. We use standardized distributions to avoid identifiability
  problems.
  
  Parameters
  ----------
  endog : array_like
      Endogenous or dependent ordered categorical variable with k levels.
      Labels or values of endog will internally transformed to consecutive
      integers, 0, 1, 2, ...
      pd.Series with ordered Categorical as dtype should be preferred as it
      gives the order relation between the levels.
      If endog is not a pandas Categorical, then categories are
      sorted in lexicographic order (by numpy.unique).
  exog : array_like
      Exogenous, explanatory variables. This should not include an intercept.
      pd.DataFrame are also accepted.
      see Notes about constant when using formulas
  offset : array_like
      Offset is added to the linear prediction with coefficient equal to 1.
  distr : string 'probit' or 'logit', or a distribution instance
      The default is currently 'probit' which uses the normal distribution
      and corresponds to an ordered Probit model. The distribution is
      assumed to have the main methods of scipy.stats distributions, mainly
      cdf, pdf and ppf. The inverse cdf, ppf, is only use to calculate
      starting values.
  
  Notes
  -----
  Status: experimental, core results are verified, still subclasses
  `GenericLikelihoodModel` which will change in future versions.
  
  The parameterization of OrderedModel requires that there is no constant in
  the model, neither explicit nor implicit. The constant is equivalent to
  shifting all thresholds and is therefore not separately identified.
  
  Patsy's formula specification does not allow a design matrix without
  explicit or implicit constant if there are categorical variables (or maybe
  splines) among explanatory variables. As workaround, statsmodels removes an
  explicit intercept.
  
  Consequently, there are two valid cases to get a design matrix without
  intercept when using formulas:
  
  - specify a model without explicit and implicit intercept which is possible
    if there are only numerical variables in the model.
  - specify a model with an explicit intercept which statsmodels will remove.
  
  Models with an implicit intercept will be overparameterized, the parameter
  estimates will not be fully identified, cov_params will not be invertible
  and standard errors might contain nans. The computed results will be
  dominated by numerical imprecision coming mainly from convergence tolerance
  and numerical derivatives.
  
  The model will raise a ValueError if a remaining constant is detected.
docstr: Predicted probabilities for each level of the ordinal endog.
  
  Parameters
  ----------
  params : ndarray
      Parameters for the Model, (exog_coef, transformed_thresholds).
  exog : array_like, optional
      Design / exogenous data. If exog is None, model exog is used.
  offset : array_like, optional
      Offset is added to the linear prediction with coefficient
      equal to 1. If offset is not provided and exog
      is None, uses the model's offset if present.  If not, uses
      0 as the default value.
  which : {"prob", "linpred", "cumprob"}
      Determines which statistic is predicted.
  
      - prob : predicted probabilities to be in each choice. 2-dim.
      - linear : 1-dim linear prediction of the latent variable
        ``x b + offset``
      - cumprob : predicted cumulative probability to be in choice k or
        lower
  
  Returns
  -------
  predicted values : ndarray
      If which is "prob", then 2-dim predicted probabilities with
      observations in rows and one column for each category or level of
      the categorical dependent variable.
      If which is "cumprob", then "prob" ar cumulatively added to get the
      cdf at k, i.e. probability of observing choice k or lower.
      If which is "linpred", then the conditional prediction of the
      latent variable is returned. In this case, the return is
      one-dimensional.
code: def predict(self, params, exog=None, offset=None, which="prob"):
      """
      Predicted probabilities for each level of the ordinal endog.
  
      Parameters
      ----------
      params : ndarray
          Parameters for the Model, (exog_coef, transformed_thresholds).
      exog : array_like, optional
          Design / exogenous data. If exog is None, model exog is used.
      offset : array_like, optional
          Offset is added to the linear prediction with coefficient
          equal to 1. If offset is not provided and exog
          is None, uses the model's offset if present.  If not, uses
          0 as the default value.
      which : {"prob", "linpred", "cumprob"}
          Determines which statistic is predicted.
  
          - prob : predicted probabilities to be in each choice. 2-dim.
          - linear : 1-dim linear prediction of the latent variable
            ``x b + offset``
          - cumprob : predicted cumulative probability to be in choice k or
            lower
  
      Returns
      -------
      predicted values : ndarray
          If which is "prob", then 2-dim predicted probabilities with
          observations in rows and one column for each category or level of
          the categorical dependent variable.
          If which is "cumprob", then "prob" ar cumulatively added to get the
          cdf at k, i.e. probability of observing choice k or lower.
          If which is "linpred", then the conditional prediction of the
          latent variable is returned. In this case, the return is
          one-dimensional.
      """
      # note, exog and offset handling is in linpred
  
      thresh = self.transform_threshold_params(params)
      xb = self._linpred(params, exog=exog, offset=offset)
      if which == "linpred":
          return xb
      xb = xb[:, None]
      low = thresh[:-1] - xb
      upp = thresh[1:] - xb
      if which == "prob":
          prob = self.prob(low, upp)
          return prob
      elif which in ["cum", "cumprob"]:
          cumprob = self.cdf(upp)
          return cumprob
      else:
          raise ValueError("`which` is not available")
  
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 10 for calling the OrderedModel obj's underlying member method code with example usage: obj.predict(params, exog, offset, which) and returns: xb, prob, cumprob