lifereg过程针对生存数据拟合有关生存时间的参数模型,
一般用来确定寿命与各影响因素之间的关系,但当没有其他影响因素,只有寿命数据的情况下,对数函数的似然值 该怎么计算呢?
下面是我编的程序:
data Fan;
input Lifetime Censor@@;
Lifetime = Lifetime / 1000;
datalines;
450 0 460 1 1150 0 1150 0 1560 1
1600 0 1660 1 1850 1 1850 1 1850 1
1850 1 1850 1 2030 1 2030 1 2030 1
2070 0 2070 0 2080 0 2200 1 3000 1
3000 1 3000 1 3000 1 3100 0 3200 1
3450 0 3750 1 3750 1 4150 1 4150 1
4150 1 4150 1 4300 1 4300 1 4300 1
4300 1 4600 0 4850 1 4850 1 4850 1
4850 1 5000 1 5000 1 5000 1 6100 1
6100 0 6100 1 6100 1 6300 1 6450 1
6450 1 6700 1 7450 1 7800 1 7800 1
8100 1 8100 1 8200 1 8500 1 8500 1
8500 1 8750 1 8750 0 8750 1 9400 1
9900 1 10100 1 10100 1 10100 1 11500 1
;
run;
----------------------------------------------------------------------------------
下面的程序用来拟合weibull分布,注意,“model Lifetime*Censor( 1 ) =”这里没有因子或者影响因素,这个时候的对数似然值该怎么计算呢?
ods graphics on;
proc lifereg data=Fan;
model Lifetime*Censor( 1 ) = / d = Weibull;
probplot
ppout
npintervals=simul
;
inset;
run;
ods graphics off;
程序执行完以后,对于Weibull分布有以下结果:
Model Information
Data Set WORK.FAN
Dependent Variable Log(Lifetime)
Censoring Variable Censor
Censoring Value(s) 1
Number of Observations 70
Noncensored Values 12
Right Censored Values 58
Left Censored Values 0
Interval Censored Values 0
Name of Distribution Weibull
Log Likelihood -42.24799655
这个对数似然函数值是怎么计算出来的?
各位高人给解答一下呀,我算出来的是-146,差太多了!