I am looking for a statistical method to calculate the conditional hazard before the diagnoses or study has started; in other words, time is not a variable.

For example, here is a hypothetical graph:

enter image description here


x is a continuous predictor/covariate i.e.: humidity

damage is analogous to death i.e.: a banana going completely brown

h(damage|x) is the instantaneous hazard rate given $x$ is at a specific value i.e.: the hazard rate that a banana goes fully brown given that humidity = 6 g/m^3

Here is a motivating image

enter image description here

So, the goal is to statistically quantify the force that humidity exerts on the banana to make it turn brown. A specific level might make the banana go immediately brown (instant death) and some other level has no effect or even preserving effect. Once again, this is to be determined before we begin the survival study (in time) for one or many bananas. This is very important.

All my online searches online take me to Cox Proportional Model which is not what I am looking for.

One promising formula is the hazard ratio from probability as shown in this wiki


However, $p$ is left undefined. Is it some kind of conditional probability? Does it apply to other models other than Cox's..? I don't know but I like the formula since it gives me hope that I can use basic probability methods like the maximum likelihood, some parametric model, etc.

Edit: I found a formula in a paper which they also called odds ratio and this makes more sense


where $F(t)$ and $S(t)$ are the the cumulative and survival function respectively.

Also, I believe at time zero there is no conditioning; hence, the hazard reduces to the probability of dying in the first $\delta t$

Another thought is to let $HR$ itself be a random variable, take enough measurements (not sure if it is possible to measure an HR observation) to fit a distribution, then derive the the continuous conditional hazard at each level.

Any help would be greatly appreciated.


It may help to remember how the hazard function is defined:

$ h(t) = \frac{f(t)}{S(t)}$

where $f(t)$ is either the probability density function for continuous random variables or probability mass function for a discrete random variables, and $S(t)$ is the survival function, i.e., 1 - CDF.

One can see right away that the hazard function at $t = 0$ is just equal to $f(0)$, as $S(0) = t$ for general survival analysis distributions. In other words, it sounds like you are not interested in the survival analysis part of the problem at all, you are just interested in the probability of immediate damage and don't really care about the probability of failure beyond the first unit of time. If that's the case, this isn't really a survival analysis problem and you probably just want to use tools designated for estimating probabilities, i.e., logistic regression.

  • $\begingroup$ I think you are correct - but I am struggling to conceptualize the problem. Is it possible you can give me a hint how to setup the logistic regression. Not a full example. Matter of fact I fully agree with you because $h(0) = f(0)/1$; hence, the hazard is just the probability of dying immediately per say. So how can I use logistic regression to find the probabilities $h(0|x)$ given that $x$ is some observable continuous state. $\endgroup$ – Edv Beq Mar 23 at 1:25
  • $\begingroup$ @EdvBeq: I'm not quite grasping what the issues are: logistic regression can handle continuous predictors (but it sounds like you want to allow for non-linear effects, which is a separate issue). So basically you just want to perform logistic regression where the outcome of interest is "immediate failure at t = 0". $\endgroup$ – Cliff AB Mar 23 at 1:39
  • $\begingroup$ In my "banana" example - I do not have an outcome of 1 or 0. I can observe some browning of the banana during a state $X=x$ but I do not know of a way to quantify it. $\endgroup$ – Edv Beq Mar 23 at 1:54
  • $\begingroup$ Can the outcome be a probability between 0 and 1 instead of 0 or 1? $\endgroup$ – Edv Beq Mar 29 at 1:39

I think your question here suffers from the fact that it is ambiguous about which variable you are setting to zero. It is also problematic insofar as you posit your question about the hazard function for survival modelling for a binary variable, but you then explain that you are actually not measuring with a binary variable - you are measuring continuous degradation of an objection.

In your problem you are not observing a single binary change of state, and so this problem falls outside of standard survival analysis. Instead, you are observing a monotonic degradation of the item, which reaches some threshold of failure. This type of problem falls within degradation analysis, which is an extension of survival modelling that occurs when you have an observable degradation measure that leads to the binary dichotomy of use and failure.

Modelling your degradation problem: In your problem you have some observable "degradation measure" $D$ that measures the browning of the banana (e.g., proportion of brown on the banana). This degradation is affected by the time-of-exposure $t \geqslant 0$ and relative humidity $0 \leqslant \phi \leqslant 1$, so you have a mapping:

$$(\phi,t) \quad \mapsto \quad D(\phi,t).$$

Degradation modelling generally involves a monotonic degradation measure $D$ that drifts upward over time until it reaches a failure threshold $D_F$, at which point the object transitions into its failure state (e.g., the banana is so brown that it is no longer fit for sale/consumption). If we assume that higher relative humidity leads to more rapid failure then the function will also be monotonic with respect to the relative humidity.

The goal of degradation analysis is to estimate the true degradation function $D$ from your observed data, and thereby allow yourself to also estimate the failure probabilities for the event $D \geqslant D_F$. As in other statistical problems, this usually involves giving the degradation function a parametric form and then using the data to estimate the unknown parameters in the function, which is essentially just a standard regression problem. The observed data should be used to determine an appropriate parametric form for the degradation problem. In most applied analysis we begin with a simple linear model and then generalise this as required to get a good fit to the data.

An example: A simple model for the true regression function in this case would be a linear regression with an interaction term. This model form uses the following parametric form for the true degradation function:

$$D(\phi,t) = \beta_0 + \beta_1 \phi + \beta_2 t + \beta_3 \phi t.$$

This can also be rewritten as:

$$D(\phi,t) = (\beta_0 + \beta_1 \phi ) + (\beta_2 + \beta_3 \phi) t.$$

(You would constrain the parameters so that $\beta_1, \beta_2, \beta_3>0$, to ensure that the degradation is monotonically increasing with respect to time and humidity.) Given observed data $( D_i,\phi_i,t_i | i = 1,...,n )$, you could then use the statistical model:

$$D_i = D(\phi_i, t_i) + \varepsilon_i \quad \quad \quad \varepsilon_i \sim \text{IID N}(0, \sigma_2).$$

Estimation of the unknown parameters in the true degradation function can be done by standard regression methods (e.g., OLS estimation and subsequent analysis). Estimation of the degradation function gives an implicit estimate to the probability of failure (i.e., the probability that $D(t, \phi) \geqslant D_F$ for some $\phi$ and $t$), and thereby gives implicit estimates of the hazard functions for $\phi$ and $t$. This is the method I would recommend for your data.

  • $\begingroup$ Thank you for your reply. I find it very valuable. I am still a little confused how to use the model above to measure how much worse is one state (humidity value) from another. Also degradation is not always observable until you see a death occur that's why I was going with a hazard model. $\endgroup$ – Edv Beq Mar 28 at 1:13
  • $\begingroup$ I think you will need to specify exactly what is observable and when. Assuming that you can observe degradation over time for different humidity values, something like the above model should allow you to model the rate of degradation at each level of humidity. (This would be measured through an interaction term.) $\endgroup$ – Ben Mar 28 at 1:21
  • $\begingroup$ $x$ is a covariate - hence is always observable by definition. Damage/deterioration may be observable (banana example) or partially observable (i.e.: you take the wheels off the car and inspect the bearings only a few times during the process; the covariate $x$ here might be car usage) or may not be observable at all until the element dies (total failure). This is my understanding. So now - contributing to the failure might be $X, Y, Z$ covariates - but I am only interested in one - and I want to know - when the process is at state i.e.: $X=2$ how much worse is than when $X=1$ $\endgroup$ – Edv Beq Mar 28 at 22:20
  • $\begingroup$ Sorry, that just confuses me more - your explanation adds new variables and an entirely new situation. $\endgroup$ – Ben Mar 28 at 23:22
  • $\begingroup$ The first answer has the correct interpretation. I think my analogies may be confusing. My apologies. $\endgroup$ – Edv Beq Mar 28 at 23:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.