In this blog post we are going to fit a stratified Cox regression model by optimising its likelihood function with Optimx::optimx(). Stratified Cox regression models allow one to relax the assumption of proportional hazards over time between different exposure groups.
In this blog post we will optimise a Cox proportional hazard model using a maximum likelihood estimation (MLE) method. For this we are first going to define the likelihood function of our Cox model and its partial first derivatives, sometimes called the score function.
This blog post is a follow up on my previous post on optimising a Weibull regression model using optimx(). This time I’ll try to find a solution for the discrepancy between the confidence interval estimates of the Weibull hazard function estimated with optimx() and flexsurvreg().
In this blog post we will optimise a Weibull regression model by maximising its likelihood function using optimx() from the {optimx} package in R. In my previous blog post I showed how to optimise a Poisson regression model in the same manner.
In this blog post, we will fit a Poisson regression model by maximising its likelihood function using optimx() in R. As an example we will use the lung cancer data set included in the {survival} package.