Displaying 1 result from an estimated 1 matches for "cdmatrix".
Did you mean:
dmatrix
2008 Apr 08
1
Weibull maximum likelihood estimates for censored data
...tober 2003) page 8?
The problem is that if I type out the code as below the likelihood ratio
is greater than one.
> Interest
D C
1 17 1
2 10 0
3 15 0
4 2 0
5 42 0
6 53 0
7 193 0
8 11 0
9 2 0
10 8 0
11 12 1
library(stats4)
dur_ind_test = function (CDMatrix) # Matrix with durations and
censores
{
lLnw <- function(b){
D = CDMatrix
NT = nrow(D)
a =((NT-D[1,2]-D[NT,2])/ sum(D[,1]^b))^(1/b)
f = sum(log((a^b)*b*(D[2:(NT-1),1]^(b-1))*exp(-((a*D[2:(NT-1),1])^b))))
fd1 = (a^b)*b*(D[1,1]^(b-1))*exp(-(a*D[1,1])^b)
fdn = (a^b)*b*(D[NT,1]^(b-1))*e...