Title: | Equivalence to Control |
---|---|
Description: | Treatments of a one-way layout, being equivalent to a control, can be selected with this package. Bonferroni adjusted "two one-sided t-tests" (TOST) and related simultaneous confidence intervals are given for both differences or ratios of means of normally distributed data. For the case of equal variances and balanced sample sizes for the treatment groups, the single-step procedure of Bofinger and Bofinger (1995) <doi:10.1111/j.2517-6161.1995.tb02058.x> can be chosen. For non-normal data, the Wilcoxon test is applied. |
Authors: | Mario Hasler |
Maintainer: | Mario Hasler <[email protected]> |
License: | GPL |
Version: | 1.5 |
Built: | 2024-12-05 06:45:12 UTC |
Source: | CRAN |
Treatments of a one-way layout, being equivalent to a control, can be selected with this package. Bonferroni adjusted "two one-sided t-tests" (TOST) and related simultaneous confidence intervals are given for both differences or ratios of means of normally distributed data. For the case of equal variances and balanced sample sizes for the treatment groups, the single-step procedure of Bofinger and Bofinger (1995) <doi:10.1111/j.2517-6161.1995.tb02058.x> can be chosen. For non-normal data, the Wilcoxon test is applied.
Package: | ETC |
Type: | Package |
Version: | 1.5 |
Date: | 2022-03-02 |
License: | GPL |
LazyLoad: | yes |
etc.diffSimultaneous equivalence tests and related confidence intervals for differences to control
etc.ratSimultaneous equivalence tests and related confidence intervals for ratios to control
BWData set of body weights measured in a toxicological study
Mario Hasler
Maintainer: Mario Hasler <[email protected]>
Hothorn, L.A. and Hasler, M. (2008): Proof of hazard and proof of safety in toxicological studies using simultaneous confidence intervals for differences and ratios to control, Journal of Biopharmaceutical Statistics 18, 915-933;
Bofinger, E. and Bofinger M. (1995): Equivalence with respect to a control: Stepwise tests, Journal of the Royal Statistical Society B 57 (4), 721-733;
Bofinger, E. (1985): Expanded confidence intervals, Communications in Statistics - Theory and Methods 14 (8), 1849-1864
data(BW) comp <- etc.diff(formula=Weight~Dose, data=BW, margin.up=30, method="Bofinger") summary(comp)
data(BW) comp <- etc.diff(formula=Weight~Dose, data=BW, margin.up=30, method="Bofinger") summary(comp)
Body weights of a 90-day chronic toxicological study on rats with a control and three dose groups.
data(BW)
data(BW)
A data frame with 60 observations on the following 2 variables.
Weight
a numeric vector containing the bodyweights of rats
Dose
a factor with levels 1
2
3
4
,
specifying the dose groups, where 1
is the control group
Hothorn, L.A. (2004): Statistische Auswerteverfahren. In: Regulatorische Toxikologie (Reichl, F.X., ed.). Springer Verlag Heidelberg, pp. 167-181.
library(ETC) data(BW) boxplot(Weight~Dose, data=BW)
library(ETC) data(BW) boxplot(Weight~Dose, data=BW)
Performs simultaneous equivalence tests and related confidence intervals for differences to control in a one-way layout.
etc.diff(formula, data, base = 1, margin.up = NULL, margin.lo = -margin.up, method = "var.unequal", FWER = 0.05)
etc.diff(formula, data, base = 1, margin.up = NULL, margin.lo = -margin.up, method = "var.unequal", FWER = 0.05)
formula |
a formula specifying a numerical response and a grouping factor (e.g., response ~ treatment) |
data |
a data frame containing the response and group variable as columns |
base |
a single integer specifying the control group |
margin.up |
a single numerical value or a numeric vector (of lenght equal to the number of comparisons) for absolute upper margins under the null hypotheses |
margin.lo |
a single numerical value or a numeric vector (of lenght equal to the number of comparisons) for absolute lower margins under the null hypotheses, set to -margin.up by default if not given |
method |
a character string:
|
FWER |
a single numeric value specifying the familywise error rate to be controlled by the simultaneous confidence intervals |
Having several treatment groups and a control in a one-way layout, the object is to simultaneously select those treatments being equivalent to the control. Bonferroni adjusted "two one-sided t-tests" (TOST) and related simultaneous confidence intervals are used for differences of means of normally distributed data with equal group variances (method="var.equal"). A pooled sample variance over all treatments is taken in this case. Welch-t-Tests are applied for unequal variances (method="var.unequal"). If the sample sizes of the treatment groups are balanced in the case of equal variances, the single-step procedure of Bofinger and Bofinger (1995) can be chosen with p-values and quantiles coming from a multivariate t-distribution (method="Bofinger"). A warning is given in the output if the Bofinger method is applied for unbalanced treatment groups. For non-normal data, tests based on wilcox.test(..., exact=FALSE, correct=TRUE, ...) are used (method="non.par").
An object of class etc.diff containing:
estimate |
a (named) vector of estimated differences |
test.stat |
a (named) vector of the calculated test statistics |
degr.fr |
either a single degree of freedom (method="var.equal" and method="Bofinger") or a (named) vector of degrees of freedom (method="var.unequal") |
corr.mat |
if method="Bofinger", the correlation matrix of the multivariate t-distribution |
crit.value |
either a single critical value (method="var.equal" and method="Bofinger") or a (named) vector of critical values (method="var.unequal") |
p.value |
a (named) vector of p-values adjusted for multiplicity |
conf.int |
a (named) matrix of simultaneous confidence intervals |
The confidence intervals related to the TOST method (method="var.equal", method="var.unequal", and method="non.par") have simultaneous coverage probability (1-2alpha), while the intervals according to Bofinger and Bofinger (1995) (method="Bofinger") have (1-alpha). All intervals are "expanded", see Bofinger (1985).
Mario Hasler
Hothorn, L.A. and Hasler, M. (2008): Proof of hazard and proof of safety in toxicological studies using simultaneous confidence intervals for differences and ratios to control, Journal of Biopharmaceutical Statistics 18, 915-933;
Bofinger, E. and Bofinger M. (1995): Equivalence with Respect to a Control: Stepwise Tests, Journal of the Royal Statistical Society B 57 (4), 721-733;
Bofinger, E. (1985): Expanded confidence intervals, Communications in Statistics - Theory and Methods 14 (8), 1849-1864
data(BW) comp <- etc.diff(formula=Weight~Dose, data=BW, margin.up=30, method="Bofinger") summary(comp)
data(BW) comp <- etc.diff(formula=Weight~Dose, data=BW, margin.up=30, method="Bofinger") summary(comp)
Performs simultaneous equivalence tests and related confidence intervals for ratios to control in a one-way layout.
etc.rat(formula, data, base = 1, margin.up = NULL, margin.lo = 1/margin.up, method = "var.unequal", FWER = 0.05)
etc.rat(formula, data, base = 1, margin.up = NULL, margin.lo = 1/margin.up, method = "var.unequal", FWER = 0.05)
formula |
a formula specifying a numerical response and a grouping factor (e.g., response ~ treatment) |
data |
a data frame containing the response and group variable as columns |
base |
a single integer specifying the control group |
margin.up |
a single numerical value or a numeric vector (of lenght equal to the number of comparisons) for relative upper margins under the null hypotheses |
margin.lo |
a single numerical value or a numeric vector (of lenght equal to the number of comparisons) for relative lower margins under the null hypotheses, set to 1/margin.up by default if not given |
method |
a character string:
|
FWER |
a single numeric value specifying the familywise error rate to be controlled by the simultaneous confidence intervals |
Having several treatment groups and a control, the object is to simultaneously select those treatments being equivalent to the control. Bonferroni adjusted "two one-sided t-tests" (TOST) and related simultaneous confidence intervals are used for ratios of means of normally distributed data with equal group variances (method="var.equal"). A pooled sample variance over all treatments is taken in this case. Welch-t-Tests are applied for unequal variances (method="var.unequal").
An object of class etc.rat containing:
estimate |
a (named) vector of estimated ratios |
test.stat |
a (named) vector of the calculated test statistics (method="var.equal") |
test.stat.up |
a (named) vector of the calculated test statistics (up) (method="var.unequal") |
test.stat.do |
a (named) vector of the calculated test statistics (do) (method="var.unequal") |
degr.fr |
a single degree of freedom (method="var.equal") |
degr.fr.up |
a (named) vector of degrees of freedom for test statistics (up) (method="var.unequal") |
degr.fr.do |
a (named) vector of degrees of freedom for test statistics (do) (method="var.unequal") |
degr.fr.ci |
a (named) vector of degrees of freedom used for the confidence intervals (method="var.unequal") |
crit.value |
a single critical value (method="var.equal") |
crit.value.up |
a (named) vector of critical values for test statistics (up) (method="var.unequal") |
crit.value.do |
a (named) vector of critical values for test statistics (do) (method="var.unequal") |
crit.value.ci |
a (named) vector of critical values for the confidence intervals (method="var.unequal") |
p.value |
a (named) vector of p-values adjusted for multiplicity |
conf.int |
a (named) matrix of simultaneous confidence intervals |
Because related to the TOST method, the confidence intervals have simultaneous coverage probability (1-2alpha). The intervals are "expanded", see Bofinger (1985).
Mario Hasler
Hothorn, L.A. and Hasler, M. (2008): Proof of hazard and proof of safety in toxicological studies using simultaneous confidence intervals for differences and ratios to control, Journal of Biopharmaceutical Statistics 18, 915-933;
Bofinger, E. (1985): Expanded confidence intervals, Communications in Statistics - Theory and Methods 14 (8), 1849-1864
data(BW) comp <- etc.rat(formula=Weight~Dose, data=BW, margin.up=1.25, method="var.equal") summary(comp)
data(BW) comp <- etc.rat(formula=Weight~Dose, data=BW, margin.up=1.25, method="var.equal") summary(comp)
A short print out of the results of etc.diff.
## S3 method for class 'etc.diff' print(x, digits = 4, ...)
## S3 method for class 'etc.diff' print(x, digits = 4, ...)
x |
an object of class "etc.diff" as obtained by calling etc.diff |
digits |
digits for rounding the results |
... |
arguments to be passed to print |
A print out containing the margins, estimates, confidence intervals, and p.values computed by etc.diff.
Mario Hasler
A short print out of the results of etc.rat.
## S3 method for class 'etc.rat' print(x, digits = 4, ...)
## S3 method for class 'etc.rat' print(x, digits = 4, ...)
x |
an object of class "etc.rat" as obtained by calling etc.rat |
digits |
digits for rounding the results |
... |
arguments to be passed to print |
A print out containing the margins, estimates, confidence intervals, and p.values computed by etc.rat.
Mario Hasler
A detailed print out of the results of etc.diff.
## S3 method for class 'etc.diff' summary(object, digits = 4, ...)
## S3 method for class 'etc.diff' summary(object, digits = 4, ...)
object |
an object of class "etc.diff" as obtained by calling etc.diff |
digits |
digits for rounding the results |
... |
arguments to be passed to print |
A print out containing the margins, degrees of freedom (not for method="non.par"), correlation matrix (if method="Bofinger"), estimates, critical values (not for method="non.par"), test statistics, confidence intervals, and p.values computed by etc.diff.
Mario Hasler
A detailed print out of the results of etc.rat.
## S3 method for class 'etc.rat' summary(object, digits = 4, ...)
## S3 method for class 'etc.rat' summary(object, digits = 4, ...)
object |
an object of class "etc.rat" as obtained by calling etc.rat |
digits |
digits for rounding the results |
... |
arguments to be passed to print |
A print out containing the margins, degrees of freedom, estimates, critical values, test statistics, confidence intervals, and p.values computed by etc.rat.
Mario Hasler