I am doing survival analysis and writing codes to compute MLE for several distributions. Yet, I get stuck while writing for Pareto distribution with right censored observation.
For complete/uncensored data, it can be dealt with by using the following coding provided by Macro in this post: How do I fit a set of data to a Pareto distribution in R?
pareto.MLE <- function(x)
{
n <- length(x)
m <- min(x)
a <- n/sum(log(x)-log(m))
return( c(m,a) )
}
# example.
library(VGAM)
set.seed(1)
z = rpareto(1000, 2, 6)
pareto.MLE(z)
[1] 1.000014 5.065213
So, how about right censored data? I tried to follow the steps the previous post shows for right censored data by using its survival function where S(t)=(b/t)^a, but I still couldn't manage to get a solution, as I got n*log(m)-sum(log(t))=0, there's no more a after the differentiation w.r.t. a.
What should I do?