kenithgrey / ggQC

ggQC
GNU General Public License v3.0
45 stars 9 forks source link

The Cpk value seems not correct for the one-sided specification when using the function of CapabilityAnaylsis #57

Open KEWH4E opened 3 days ago

KEWH4E commented 3 days ago

For example, when setting LSL=NULL as below, the calculated Cpk is 7.39. However, the correct Cpk should be 2.46. Could the author help to review the code?

CapabilityAnaylsis <- ggplot(Process_Data, aes(x = Value)) + #init ggplot geom_histogram(binwidth = .75, color="purple") + #make the histogram stat_QC_Capability( LSL=NULL, USL=37, #Specify LSL and USL show.cap.summary = c("Cp", "Cpk", "Pp, "Ppk"), #selected summary digits = 2, #report two digits method="XmR") + #Use the XmR method scale_x_continuous(expand = expand_scale(mult = c(0.15,.65))) #pad the X-axis CapabilityAnaylsis

KEWH4E commented 3 days ago

@kenithgrey Thanks