class_docstr: Estimation and inference for a survival function.
  
  The survival function S(t) = P(T > t) is the probability that an
  event time T is greater than t.
  
  This class currently only supports right censoring.
  
  Parameters
  ----------
  time : array_like
      An array of times (censoring times or event times)
  status : array_like
      Status at the event time, status==1 is the 'event'
      (e.g. death, failure), meaning that the event
      occurs at the given value in `time`; status==0
      indicates that censoring has occurred, meaning that
      the event occurs after the given value in `time`.
  entry : array_like, optional An array of entry times for handling
      left truncation (the subject is not in the risk set on or
      before the entry time)
  title : str
      Optional title used for plots and summary output.
  freq_weights : array_like
      Optional frequency weights
  exog : array_like
      Optional, if present used to account for violation of
      independent censoring.
  bw_factor : float
      Band-width multiplier for kernel-based estimation.  Only used
      if exog is provided.
  
  Attributes
  ----------
  surv_prob : array_like
      The estimated value of the survivor function at each time
      point in `surv_times`.
  surv_prob_se : array_like
      The standard errors for the values in `surv_prob`.  Not available
      if exog is provided.
  surv_times : array_like
      The points where the survival function changes.
  n_risk : array_like
      The number of subjects at risk just before each time value in
      `surv_times`.  Not available if exog is provided.
  n_events : array_like
      The number of events (e.g. deaths) that occur at each point
      in `surv_times`.  Not available if exog is provided.
  
  Notes
  -----
  If exog is None, the standard Kaplan-Meier estimator is used.  If
  exog is not None, a local estimate of the marginal survival
  function around each point is constructed, and these are then
  averaged.  This procedure gives an estimate of the marginal
  survival function that accounts for dependent censoring as long as
  the censoring becomes independent when conditioning on the
  covariates in exog.  See Zeng et al. (2004) for details.
  
  References
  ----------
  D. Zeng (2004).  Estimating marginal survival function by
  adjusting for dependent censoring using many covariates.  Annals
  of Statistics 32:4.
  https://arxiv.org/pdf/math/0409180.pdf
class_docstr_tok: ["Estimation","and","inference","for","a","survival","function",".","The","survival","function","S","(","t",")","=","P","(","T",">","t",")","is","the","probability","that","an","event","time","T","is","greater","than","t.","This","class","currently","only","supports","right","censoring",".","Parameters","--","--","--","--","--","time",":","array_like","An","array","of","times","(","censoring","times","or","event","times",")","status",":","array_like","Status","at","the","event","time",",","status==1","is","the","'event'","(","e.g",".","death",",","failure",")",",","meaning","that","the","event","occurs","at","the","given","value","in","`","time","`",";","status==0","indicates","that","censoring","has","occurred",",","meaning","that","the","event","occurs","after","the","given","value","in","`","time","`",".","entry",":","array_like",",","optional","An","array","of","entry","times","for","handling","left","truncation","(","the","subject","is","not","in","the","risk","set","on","or","before","the","entry","time",")","title",":","str","Optional","title","used","for","plots","and","summary","output",".","freq_weights",":","array_like","Optional","frequency","weights","exog",":","array_like","Optional",",","if","present","used","to","account","for","violation","of","independent","censoring",".","bw_factor",":","float","Band-width","multiplier","for","kernel-based","estimation",".","Only","used","if","exog","is","provided",".","Attributes","--","--","--","--","--","surv_prob",":","array_like","The","estimated","value","of","the","survivor","function","at","each","time","point","in","`","surv_times","`",".","surv_prob_se",":","array_like","The","standard","errors","for","the","values","in","`","surv_prob","`",".","Not","available","if","exog","is","provided",".","surv_times",":","array_like","The","points","where","the","survival","function","changes",".","n_risk",":","array_like","The","number","of","subjects","at","risk","just","before","each","time","value","in","`","surv_times","`",".","Not","available","if","exog","is","provided",".","n_events",":","array_like","The","number","of","events","(","e.g",".","deaths",")","that","occur","at","each","point","in","`","surv_times","`",".","Not","available","if","exog","is","provided",".","Notes","--","--","-","If","exog","is","None",",","the","standard","Kaplan-Meier","estimator","is","used",".","If","exog","is","not","None",",","a","local","estimate","of","the","marginal","survival","function","around","each","point","is","constructed",",","and","these","are","then","averaged",".","This","procedure","gives","an","estimate","of","the","marginal","survival","function","that","accounts","for","dependent","censoring","as","long","as","the","censoring","becomes","independent","when","conditioning","on","the","covariates","in","exog",".","See","Zeng","et","al",".","(","2004",")","for","details",".","References","--","--","--","--","--","D.","Zeng","(","2004",")",".","Estimating","marginal","survival","function","by","adjusting","for","dependent","censoring","using","many","covariates",".","Annals","of","Statistics","32:4.","https",":","\/\/arxiv.org\/pdf\/math\/0409180.pdf"]
docstr: Estimated quantile of a survival distribution.
  
  Parameters
  ----------
  p : float
      The probability point at which the quantile
      is determined.
  
  Returns the estimated quantile.
docstr_tok: ["Estimated","quantile","of","a","survival","distribution",".","Parameters","--","--","--","--","--","p",":","float","The","probability","point","at","which","the","quantile","is","determined",".","Returns","the","estimated","quantile","."]
code: def quantile(self, p):
      """
      Estimated quantile of a survival distribution.
  
      Parameters
      ----------
      p : float
          The probability point at which the quantile
          is determined.
  
      Returns the estimated quantile.
      """
  
      # SAS uses a strict inequality here.
      ii = np.flatnonzero(self.surv_prob < 1 - p)
  
      if len(ii) == 0:
          return np.nan
  
      return self.surv_times[ii[0]]
  
file_path: statsmodels/statsmodels/duration/survfunc.py
imports: import numpy
  import pandas
  from scipy.stats.distributions import chi2, norm
  from statsmodels.graphics import utils
label_desc: Use image node_id 3 for calling the SurvfuncRight obj's underlying member method code with example usage: obj.quantile(p) and returns: self, np