t.test.ratio {mratios}R Documentation

t-test for the ratio of two means

Description

Performs t-test for the ratio of means of independent samples from two gaussian distributions. In case of heterogeneous variances a Satterthwaite approximation of the degrees of freedom is used (Tamhane & Logan, 2004).

Usage

t.test.ratio(x, ...) 
## Default S3 method:
t.test.ratio(x, y, alternative = "two.sided",
 rho = 1, var.equal = FALSE, conf.level = 0.95, ...)
## S3 method for class 'formula':
t.test.ratio(formula, data, base=2, ...)

Arguments

x A numeric vector (group in the numerator of the ratio)
y A numeric vector (group in the denominator of the ratio)
formula A two-sided formula specifying a numeric response variable and a factor with two levels
data A dataframe containing the variables specified in formula. Note: the first group in alpha-numeric order will appear in the denominator of the ratio
alternative character string defining the alternative hypothesis, one of "two.sided", "less" or "greater"
rho a single numeric value: the margin or ratio under the null hypothesis
var.equal logical, if set TRUE, a ratio-t-test assuming equal group variances is performed, otherwise (default) unequal variances are assumed
conf.level confidence level of Fieller's interval for the ratio of two means
base if formula is used: a single numeric value specifying whether the first or second group (according to alpha-numeric order) is to be used as denominator
... arguments to be passed to t.test.ratio.default

Details

Value

An object of class "htest"

Author(s)

Frank Schaarschmidt

References

Kieser, M., Hauschke, D. (2000): Statistical methods for demonstrating equivalence in crossover trials based on the ratio of two location parameters. Drug Information Journal 34, 563-568.

Tamhane, A.C., Logan, B.R. (2004): Finding the maximum safe dose level for heteroscedastic data. Journal of Biopharmaceutical Statistics 14, 843-856.

See Also

Examples


library(mratios)

# # # ASAT values of female rats in a toxicity study
#     (Hauschke, 1999).

data(ASAT)
ASAT

t.test.ratio(ASAT~group, data=ASAT, alternative="less",
 base=1, rho=1.25, var.equal=TRUE)

# # # Bodyweights of male rats in a toxicity study.
# Objective was to show equivalence between the high
# dose group (Dosis) and the control group (Kon).
# Equivalence margins are set to 0.8 and 1.25. The 
# type-I-error to show equivalence is set to alpha=0.05.

data(rat.weight)

# two one-sided tests:

t.test.ratio(weight~group, data=rat.weight, alternative="less",
 rho=1.25, var.equal=TRUE)

t.test.ratio(weight~group, data=rat.weight, alternative="greater",
 rho=0.8, var.equal=TRUE)


# For rho=1, t.test.ratio corresponds to a simple t.test
# with the difference of means under the null set to zero 
# (,i.e. mu=0).

t.test.ratio(ASAT~group, data=ASAT, alternative="less",
 rho=1, var.equal=TRUE)

t.test(ASAT~group, data=ASAT, alternative="less",
 mu=0, var.equal=TRUE)




[Package mratios version 1.2.3 Index]