Class InferSmpFamily

java.lang.Object
jline.api.infer.InferSmpFamily

public final class InferSmpFamily extends Object
The parametric families InferSmp fits, in one place so that the estimator, the hazard conversions and the Environment builder read one parameterization. Every family is fitted in UNCONSTRAINED coordinates theta:
  • "exp": theta = log(rate), Exp(rate)
  • "weibull": theta = [log(shape), log(scale)], Weibull(shape, scale)
  • "gamma": theta = [log(shape), log(scale)], Gamma(shape, scale)
  • "lognormal": theta = [mu, log(sigma)], Lognormal(mu, sigma)
Port of MATLAB infer_smp_family.m.
  • Method Summary

    Modifier and Type
    Method
    Description
    dist(String family, double[] th, double eta)
    The LINE distribution of the law with hazard h0(t) exp(eta).
    static double[][]
    logfs(String family, double[] th, double[] t, double[] eta)
    Log density (row 0) and log survival (row 1) at the instants t under the proportional-hazards factor exp(eta) (eta null for the baseline, else one per instant): H(t) = H0(t) exp(eta), log h = log h0 + eta, log f = log h - H.
    static double[]
    natural(String family, double[] th)
    Natural parameters: rate | shape, scale | mu, sigma.
    static int
    npar(String family)
    Number of parameters of the family; refuses an unknown name.
    static double[]
    theta0(String family, double[] tev, double texp)
    Starting point from the event times tev and the total exposure texp.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • npar

      public static int npar(String family)
      Number of parameters of the family; refuses an unknown name.
    • logfs

      public static double[][] logfs(String family, double[] th, double[] t, double[] eta)
      Log density (row 0) and log survival (row 1) at the instants t under the proportional-hazards factor exp(eta) (eta null for the baseline, else one per instant): H(t) = H0(t) exp(eta), log h = log h0 + eta, log f = log h - H. The survival of "gamma" and "lognormal" is floored at 1e-300 before the log, so a censored time far in the tail costs a large finite penalty.
    • natural

      public static double[] natural(String family, double[] th)
      Natural parameters: rate | shape, scale | mu, sigma.
    • theta0

      public static double[] theta0(String family, double[] tev, double texp)
      Starting point from the event times tev and the total exposure texp.
    • dist

      public static Distribution dist(String family, double[] th, double eta)
      The LINE distribution of the law with hazard h0(t) exp(eta). Only "exp" and "weibull" are closed under a proportional-hazards factor; the other two are refused for eta != 0.