Hi. I am having problem with calculating the hazard ratio between two individuals.
The following code doesn’t pass the tests and I can’t find the root cause. It there really a problem with calculating the ratio? To me it seems the problem might be somewhere else.
HI @Tomas_Prinda ,
Welcome to the community! this is your first time posting
Regarding your question, the solution is in the formula. Check out carefully the formula and you’ll notice that you are missing an important operation in the (case_1 - case_2). More specifically, see carefully the first formula on this section.
Try that and let me know how it goes.
Thanks,
Juan
By the way: Please remove your code - it goes against the Code of Honor to post code Thanks!
Hi Juan, thanks for a quick reaction.
What I think is missing is the transpose operation. But as the inputs passed to the function are 1D, it shouldn’t matter. Also when tried with transpose the result is the same.