[R] Servreg $loglik
Charles Annis, P.E.
charles.annis at statisticalengineering.com
Tue Jul 20 17:20:15 CEST 2010
Dear R-experts:
I am using survreg() to estimate the parameters of a Weibull density having
right-censored observations. Some observations are weighted. To do that I
regress the weighed observations against a column of ones.
When I enter the data as 37 weighted observations, the parameter estimates
are exactly the same as when I enter the data as the corresponding 70
unweighted observations. This is to be expected, of course.
I don't understand, however, why the reported loglikelihood is
> parameter.estimates$loglik
[1] -120.4699 -120.4699
for the 37 weighted observations, but
> parameter.estimates$loglik
[1] -135.1527 -135.1527
for the 70 unweighted observations.
(For the record, my computations of the loglikelihood, using the dweibull()
function for the observations and the pweibull() function for the censored
observations, is -135.1527 for both 37 weighted and 70 unweighted.)
I am using the data from Meeker and Escobar, _Statistical Methods for
Reliability Data_, Wiley (1998), Table C.1, shown below:
Hours Status Num.Parts
450 Failure 1
460 R-Censored 1
1150 Failure 2
1560 R-Censored 1
1600 Failure 1
1660 R-Censored 1
1850 R-Censored 5
2030 R-Censored 3
2070 Failure 2
2080 Failure 1
2200 R-Censored 1
3000 R-Censored 4
3100 Failure 1
3200 R-Censored 1
3450 Failure 1
3750 R-Censored 2
4150 R-Censored 4
4300 R-Censored 4
4600 Failure 1
4850 R-Censored 4
5000 R-Censored 3
6100 R-Censored 3
6100 Failure 1
6300 R-Censored 1
6450 R-Censored 2
6700 R-Censored 1
7450 R-Censored 1
7800 R-Censored 2
8100 R-Censored 2
8200 R-Censored 1
8500 R-Censored 3
8750 R-Censored 2
8750 Failure 1
9400 R-Censored 1
9900 R-Censored 1
10100 R-Censored 3
11500 R-Censored 1
I am running R version 2.11.1 (2010-05-31) on a HP Windows 7 box with 8 gig
RAM.
Thank you for your help.
Charles Annis, P.E.
Charles.Annis at StatisticalEngineering.com
561-352-9699
http://www.StatisticalEngineering.com
More information about the R-help
mailing list