简体   繁体   English

新 WeibullR package 生产不正确的 Weibull Plot

[英]New WeibullR package producing Incorrect Weibull Plot

I have the following data points for which I have generated a weibull plot as follows我有以下数据点,我为其生成了weibull plot,如下所示

 library(weibullR)
 left<-c( 36.0, 35.0 ,34.0 ,33.0 ,32.0 ,31.0, 30.0 ,32.5 ,35.5 ,29.5 ,28.5, 30.5, 26.5, 31.5, 20.5 ,34.5, 25.5, 10.5, 27.5, 18.5, 33.5,  2.5 ,11.5 ,23.5, 22.5 ,13.5 , 9.5 ,24.5 ,21.5,15.5, 16.5, 14.5 ,17.5, 19.5 , 0.5,  8.5,6.5)
 right<-c( -1.0, -1.0 ,-1.0 ,-1.0, -1.0, -1.0, -1.0 ,32.5, 35.5 ,29.5, 28.5, 30.5, 26.5, 31.5,20.5, 34.5, 25.5, 10.5,27.5 ,18.5, 33.5,  2.5 ,11.5, 23.5 ,22.5 ,13.5 , 9.5 ,24.5, 21.5,15.5, 16.5 ,14.5, 17.5, 19.5,  0.5 , 8.5,  6.5)
 qty<-c( 65416,29,16,7,4,2,1,45,62,21,26,34,20,41,5,44,14,2,20,6,50,1,3,21,13,7,1, 
 7,13,4,4,2,5,2,1,1,1)
 state<-c( 0 ,0, 0, 0 ,0 ,0, 0, 1, 1, 1, 1, 1 ,1 ,1, 1, 1 ,1 ,1 ,1, 1 ,1, 1 ,1 ,1, 1 ,1 ,1, 1 
 ,1, 1 ,1 ,1 ,1, 1 ,1, 1 ,1)

The above four represent the input parameters
ci<-0.9# Confidence 
dist= "weibull2p" ##Distribution type
weibull_fit<-mlefit(data.frame(left,right,qty),dist =dist)## This generates the weibulll parameters-Beta, Eta etc 
da1<-wblr(data.frame(time=left,event =state,qty=qty)) 
da1 <- wblr.fit(da1 ,dist= dist,method.fit="mle",pch=3)
#### BLCOK IN CASE OF 3 P
da1<-wblr.conf(da1,method.conf="fm",ci=as.numeric(ci),col="Red")
df <-da1$data$dpoints
df <- df[!duplicated(df[ , c("time")]),]
da1$data$dpoints <- df 
par(mar=c(1,1,1,1))
p1<-plot(da1) 
p1

The plot p1 shows a different set of parameters in the legend and the plot appears- beta, eta and loglikelihood are different and the censored data are missing. plot p1 在图例中显示了一组不同的参数,而 plot 出现 - beta、eta 和对数似然不同,并且缺少删失数据。 I am using R version 4.2.1 and weibullR 1.2.1.我正在使用 R 版本 4.2.1 和 weibullR 1.2.1。 The code I have used works well in weibullR 1.1.10.我使用的代码在 weibullR 1.1.10 中运行良好。 I request someone to guide me.我请求有人指导我。

The latest version seems to have problems with the suspension.最新版本似乎存在暂停问题。 In my case in a data frame like:在我的情况下,像这样的数据框:

y <- data.frame(time=c(1,2,3),event=c(1,0,1),qty=c(1,1,1)) y <- data.frame(time=c(1,2,3),event=c(1,0,1),qty=c(1,1,1))

the suspensions are ignored.暂停被忽略。 Without the qty column it works however if you have large numbers of suspensions you cannot omit the qty colum.如果没有 qty 列,它可以工作,但是如果您有大量的暂停,则不能省略 qty 列。 I suppose it is a bug.我想这是一个错误。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM