You can make the maximum probability for censored data.
a = matrix(c(7,12,10,10,20,3,15,40,33,57,58,60,79,132,174,201,191,184,115,70,22,2,0),1,23) colnames(a) <- c(13.5,14.5,15.5,16.5,17.5,18.5,19.5,20.5,21.5,22.5,23.5,24.5,25.5,26.5,27.5, 28.5,29.5,30.5,31.5,32.5,33.5,34.5,35.5) centers <- as.numeric(colnames(a)) low <- centers - .5 up <- centers + .5 ll.weibullCensored <- function(par, dat){ shape <- par[1] scale <- par[2]
This gives essentially the same estimates as AndresT, but their approach was simply to assume that all the data fell in the center of the bins and fulfill the maximum probability for this imputed data set. It doesn't really matter, but with this method you don't need other packages.
Edit: The fact that the AndresT solution and mine give ratings that are very similar make a lot of sense if we look at what we maximize for each method. In the mine, we look at the probability of getting into each of the "bunkers". The AndreT solution uses the distribution density at the center of the hopper as a substitute for this probability. We can look at the ratio of the probability of getting into the bunker and the density value in the center of the bunker for each of the bins (using the shape and scale obtained from my solution), which gives:
# Probability of each bin > ps [1] 0.0005495886 0.0009989085 0.0017438767 0.0029375471 0.0047912909 [6] 0.0075863200 0.0116800323 0.0174991532 0.0255061344 0.0361186335 [11] 0.0495572085 0.0656015797 0.0832660955 0.1004801353 0.1139855466 [16] 0.1197890284 0.1144657811 0.0971503491 0.0711370586 0.0433654456 [21] 0.0210758647 0.0077516837 0.0020274896
All these relationships are close to 1 - so both methods basically try to maximize the same value.