# Question about Bayesian Survival Analysis with Cox (proportional hazards) regression method in Julia with Turing

**URL:** https://discourse.julialang.org/t/question-about-bayesian-survival-analysis-with-cox-proportional-hazards-regression-method-in-julia-with-turing/80672
**Category:** Biology, Health, and Medicine
**Tags:** question
**Created:** [May 7, 2022, 2:46pm UTC](https://discourse.julialang.org/t/question-about-bayesian-survival-analysis-with-cox-proportional-hazards-regression-method-in-julia-with-turing/80672 "2022-05-07T14:46:27Z")
**Posts on this page:** 1
**Showing post:** 7

<div class="post-metadata">

### Author: ![RyanKuo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ryankuo/32/36050_2.png) [@RyanKuo](https://discourse.julialang.org/u/RyanKuo)
#### Post date: [May 10, 2022, 1:17pm UTC](https://discourse.julialang.org/t/question-about-bayesian-survival-analysis-with-cox-proportional-hazards-regression-method-in-julia-with-turing/80672/7 "2022-05-10T13:17:11Z")

</div>

Hi EvoArt:

Thank you very much for looking into it. I did have the code to categorized CMetastized:  
HSAUR[!,:CMetastized]=levelcode.(HSAUR[!,:Metastized]).-1;

I forgot to post that I used CategoricalArrays.jl . But your method works easier and faster.  
And thanks again for your explanation. I agree with you, since the exposure has many 0, that sampler would be struggled with… the formula is: μ = exposure_λ = exposure_λ0 _exp.(β ._ x) that’s why posterior is Poisson. shift by 0.1 should not affect the result. I don’t know how PyMC3 samples such a scenario and R also has a package, I will see if I can find what posterior other people used from paper. I tried to run the PyMC3 code, but it has many package dependency issues.

Best Regards,

Ryan

---

_[View the full topic](https://discourse.julialang.org/t/question-about-bayesian-survival-analysis-with-cox-proportional-hazards-regression-method-in-julia-with-turing/80672)._
