0
$\begingroup$

I want to write a code that calculates the Cox Proportional Hazard rate:

$h(t|x_it,e_i)=e^{x_it \beta + \lambda(t) + e_i}$

where $\lambda_t$ is a spline in slopes and $e_i$ is an unobserved term. My data includes age,status,health variables of people. I am pretty new in the topic so I wonder what is the best way to do this. Specifically, if I can use the data to calculate a survival function and start from there. I know there are packages in R and python for this but I need to do the coding from scratch.

$\endgroup$
0
$\begingroup$

Short answer: Just code the likelihood function and maximize it using python or R.

$\endgroup$

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.