Skip to content

Commit

Permalink
Updated equiv_change_mean documentation; minor tweak to docs for equi…
Browse files Browse the repository at this point in the history
…v_mean_extremum
  • Loading branch information
kloppen committed Jun 19, 2020
1 parent 0b26e1d commit 7fdf604
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 10 deletions.
26 changes: 21 additions & 5 deletions R/equiv.R
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@
#'
#' @seealso
#' \code{\link{k_equiv}}
#' \code{\link{calc_cv_star}}
#'
#' @references
#' M. G. Vangel. Lot Acceptance and Compliance Testing Using the Sample Mean
Expand Down Expand Up @@ -515,6 +516,7 @@ k_equiv <- function(alpha, n) {
#' @description
#' Checks for change in the mean value between a qualification data set and
#' a sample. This is normally used to check for properties such as modulus.
#' This function is a wrapper for a two-sided t--test.
#'
#' @param df_qual (optional) a data.frame containing the qualification data.
#' Defaults to NULL.
Expand Down Expand Up @@ -592,11 +594,16 @@ k_equiv <- function(alpha, n) {
#' in the mean value of the qualification data and the sample. A pooled
#' standard deviation is used in the t-test. The procedure is per CMH-17-1G.
#'
#' If the option \code{modcv = TRUE} is set, standard deviation of the
#' qualification data is replaced with CV* times \code{mean_qual} (which may
#' be passed as an argument or internally calculated from \code{data_qual}.
#'
#' When \code{modcv = TRUE}, CV* is calculated as follows:
#' If \code{modcv} is TRUE, the standard deviation used to calculate the
#' thresholds will be replaced with a standard deviation calculated
#' using the Modified Coefficient of Variation (CV) approach.
#' The Modified CV approach is a way of adding extra variance to the
#' qualification data in the case that the qualification data has less
#' variance than expected, which sometimes occurs when qualification testing
#' is performed in a short period of time.
#' Using the Modified CV approach, the standard deviation is calculated by
#' multiplying \code{CV_star * mean_qual} where \code{mean_qual} is either the
#' value supplied or the value calculated by \code{mean(data_qual)} and
#' \eqn{CV* = 0.06} if \eqn{CV < 0.04}, \eqn{CV* = cv / 2 + 0.04}
#' if \eqn{0.04 <= cv <= 0.08} and \eqn{CV* = CV} otherwise.
#'
Expand All @@ -622,6 +629,15 @@ k_equiv <- function(alpha, n) {
#' ## Result PASS
#' ## Passing Range 8.856695 to 9.623305
#'
#' @references
#' “Composite Materials Handbook, Volume 1. Polymer Matrix Composites
#' Guideline for Characterization of Structural Materials,” SAE International,
#' CMH-17-1G, Mar. 2012.
#'
#' @seealso
#' \code{\link{calc_cv_star}}
#' \code{\link[stats]{t.test}}
#'
#' @export
#'
equiv_change_mean <- function(df_qual = NULL, data_qual = NULL,
Expand Down
25 changes: 20 additions & 5 deletions man/equiv_change_mean.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions man/equiv_mean_extremum.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7fdf604

Please sign in to comment.