powered by
Calculates the mean of subgroup medians upper control limit based on the mean subgroup range. The result is used when constructing a xMedian-R charts.
xMedian_rBar_UCL(data, value, grouping, n = NULL, natural = F, formula = NULL)
data frame to be processed
numeric vector in a data frame with values of interest.
single factor/variable to split the data frame "values" by.
a number indicating a hypothetical subgroup size other than, function determined subgroup n determined by the floor length of subgroup values.
logical, if TRUE calculate limits for individuals (n=1) else calculate for n determined by the floor length of subgroup values
a formula, such as y ~ x1 + x2, where the y variable is numeric data to be split into groups according to the grouping x factors/variables
A number; mean of subgroup means Upper Control Limit (UCL) based on Median Range
# NOT RUN { set.seed(5555) df <- data.frame(v=rnorm(60, 0, 1), g=rep(c("A","B","C","D","E"), each=12)) xMedian_rBar_UCL(data = df, formula = v~g) # }
Run the code above in your browser using DataLab