Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there any method or way to get hazard ratio? #96

Open
inticoy opened this issue Sep 10, 2021 · 6 comments
Open

Is there any method or way to get hazard ratio? #96

inticoy opened this issue Sep 10, 2021 · 6 comments

Comments

@inticoy
Copy link

inticoy commented Sep 10, 2021

We are using Pycox - CoxPH Model to find out hazard ratio of each genetic mutations.
So, we put presence of each genetic mutations as 1 or 0 in x, survival time and event in y.

We want to get hazard ratio of a particular genetic mutation.
Is there any method or way to get it?

@havakv
Copy link
Owner

havakv commented Sep 17, 2021

So, if you're using a non-linear model, I don't think you can get hazard ratios for a single covariate that easily. In regular Cox regression (corresponding to a linear function x'\beta) you're able to obtain the hazard ratio of a single covariate because all the other cancels out. For a non-linear model, you can get the hazard ratio at an individual level (for individual i, the hazard ratio of covariate x is ...).

One approach for obtaining the hazard ration for when using neural networks would be to compute the hazard ratio for each individual and average that over your whole dataset. I don't know if this is common practice though.

Does this answer your question?

@srn284
Copy link

srn284 commented Oct 25, 2021

Continuing with this @havakv, for the logistic hazard /nnet survival, how would we get individual hazards? Thank you very much.

@havakv
Copy link
Owner

havakv commented Oct 30, 2021

The LogisticHazard method should have a method called predict_hazard so you can use model.predict_hazard(x) to get the individual hazards.

@srn284
Copy link

srn284 commented Nov 2, 2021

Sounds good thanks again!

@francescamanni1989
Copy link

Is there a way to get hazard ratio with deephit single?

@miniyoyo25
Copy link

Is there a way to get hazard ratio with deephit single?

Hi,I have the same question. Have you solved this yet? thank you so much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants