https://github.com/cran/IQCC
Raw File
Tip revision: 5c6e6dea621fd5b486441c5e649098ad5a6549e6 authored by Flavio Barros on 15 November 2017, 21:16:12 UTC
version 0.7
Tip revision: 5c6e6de
cchart.Xbar1.R
#' X-bar Shewhart Control Chart for phase I.
#' 
#' Builds the x-bar control chart for phase I.
#' 
#' Even if the data is not normal the x-bar statistic will be close to the
#' normal by the central limit theorem.
#' 
#' @param x The data to be plotted.
#' @param sizes A value or a vector of values specifying the sample sizes
#' associated with each group.
#' @return Return a x-bar control chart for phase I.
#' @export
#' @author Daniela R. Recchia, Emanuel P. Barbosa
#' @seealso \link{cchart.Xbar2}
#' @examples
#' 
#' data(pistonrings)
#' cchart.Xbar1(pistonrings[1:25, ])
#' 
cchart.Xbar1 <- function(x, sizes)
{
    a <- rowMeans(x)
    x2bar <- mean(a)
    sigma <- sd.xbar(x)
    qcc(x, type = "xbar", sizes)
	stat <- list(c(x2bar, sigma))
    return(stat)
}
back to top