Hi Prasad,
I think this might be a problem with the package, and you can try to
contact the package author.
The error seem to arise because the pcr() cannot find the
'negative-binomial' distribution
```
library(qualityTools)
x <- rnbinom(500, mu = 4, size = 100)
pcr(x, distribution = "negative-binomial")
```
When I look in the code of pcr(), there is some testing against the
words 'negative binomial' (note the missing -), although the
documentation clearly lists 'negative-binomial' as a possible
distribution.
Unfortunately changing 'negative-binomial' to 'negative
binomial' does
not help, as
```
pcr(x, distribution = "negative binomial")
```
throws the error "object '.confintnbinom' not found" and a lot
of
warnings.
Best,
Ulrik
On 2020-08-12 12:50, Prasad DN wrote:> Hi All,
>
> i am very new to R and need guidance.
>
> Need help in doing process capability Analysis for my data set (6
> months of
> data) given in below format:
>
> Date | Opportunities | Defectives | DefectivesInPercent
>
> I searched and found that pcr() from QualityTools package can be used
> for
> this purpose. The USL is 2% defectives.
>
> MyData = read.csv(file.choose()) #select CSV file that has data in
> above
> mentioned format.
> x <- MyData$DefectivesInPercent
>
> pcr(x, distribution = "negative-binomial", usl=0.02)
>
> I get error message as:
> Error in pcr(x, distribution = "negative-binomial", usl = 0.02) :
> y distribution could not be found!
>
> Please advise, how to proceed?
>
> Regards,
> Prasad DN
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.