# `cmstatrExt` `cmstatrExt` provides statistical methods intended for composite material data that are not included in CMH-17-1G. # Installation You can install this package from CRAN as follows: ``` r install.packages("cmstatrExt") ``` # Example Usage In these examples we’ll use the following packages: ``` r library(cmstatrExt) library(tidyverse) ``` Currently, this package provides several functions related to equivalency tests. Factors for a two-sample dual-acceptance criteria can be calculated as follows: ``` r k <- k_equiv_two_sample( alpha = 0.05, n = 18, # size of the qualification sample m = 6 # size of the acceptance sample ) k #> [1] 2.9594727 0.9541395 ``` The power of this test for detecting reduction in mean can be computed as follows: ``` r power_sim_dual( n_qual = 18, m_equiv = 6, replicates = 2500, distribution = "rnorm", param_qual = data.frame(mean = 0, sd = 1), param_equiv = data.frame(mean = seq(-2, 0, length.out = 11), sd = 1), k1 = k[1], k2 = k[2] ) %>% mutate(delta = 0 - mean) %>% ggplot(aes(x = delta, y = `Rejection Rate`)) + geom_line() ``` ![](reference/figures/power_sim_dual_example-1.png) # Development If you have a suggestion or question, please create an [issue on GitHub](https://github.com/cmstatr/cmstatrExt/issues). If you want to contribute to this package, Pull Requests are welcome! # Package index ## All functions - [`augment(`*``*`)`](https://cmstatrExt.cmstatr.net/reference/augment.average_curve_lm.md) : Augment a `data.frame` with the results from `average_curve_lm` - [`augment(`*``*`)`](https://cmstatrExt.cmstatr.net/reference/augment.average_curve_optim.md) : Augment a `data.frame` with the results from `average_curve_optim` - [`average_curve_lm()`](https://cmstatrExt.cmstatr.net/reference/average_curve_lm.md) : Generate an average curve using `lm` - [`average_curve_optim()`](https://cmstatrExt.cmstatr.net/reference/average_curve_optim.md) : Generate an average curve using `optim` - [`fff_shear`](https://cmstatrExt.cmstatr.net/reference/fff_shear.md) : Example shear stress-shear strain data - [`iso_equiv_two_sample()`](https://cmstatrExt.cmstatr.net/reference/iso_equiv_two_sample.md) : Calculate t1 and t2 pairs that have the same p-Value - [`k_equiv_two_sample()`](https://cmstatrExt.cmstatr.net/reference/k_equiv_two_sample.md) : Calculate the factors for a two-sample acceptance test - [`p_equiv()`](https://cmstatrExt.cmstatr.net/reference/p_equiv.md) : p-Value for one-sample equivalency - [`p_equiv_two_sample()`](https://cmstatrExt.cmstatr.net/reference/p_equiv_two_sample.md) : p-Value for two-sample equivalency - [`pa12_tension`](https://cmstatrExt.cmstatr.net/reference/pa12_tension.md) : Example stress-strain data - [`power_sim_dual()`](https://cmstatrExt.cmstatr.net/reference/power_sim_dual.md) : Rejection rate for dual acceptance criteria based via simulation - [`print(`*``*`)`](https://cmstatrExt.cmstatr.net/reference/print.average_curve_lm.md) : Print an `average_curve_lm` object - [`print(`*``*`)`](https://cmstatrExt.cmstatr.net/reference/print.average_curve_optim.md) : Print an `average_curve_optim` object - [`summary(`*``*`)`](https://cmstatrExt.cmstatr.net/reference/summary.average_curve_lm.md) : Summarize an `average_curve_lm` object # Articles ### All vignettes - [Equivalency Factor Calculator](https://cmstatrExt.cmstatr.net/articles/compute-equiv-factors.md): - [Equivalency p-Value Calculator](https://cmstatrExt.cmstatr.net/articles/compute-p-value-equiv.md): - [p-Values for Equivalency](https://cmstatrExt.cmstatr.net/articles/equivalency-p-values.md): - [Stress-Strain Curves](https://cmstatrExt.cmstatr.net/articles/stress-strain.md):