pairwiseCImethodsCont {pairwiseCI} | R Documentation |
Confidence interval methods available for pairwiseCI for comparison of two independent samples. Methods for continuous variables.
Param.diff(x, y, conf.level=0.95, alternative="two.sided", ...) Param.ratio(x, y, conf.level=0.95, alternative="two.sided", ...) Lognorm.diff(x, y, conf.level=0.95, alternative="two.sided", ...) Lognorm.ratio(x, y, conf.level=0.95, alternative="two.sided", ...) HL.diff(x, y, conf.level=0.95, alternative="two.sided", ...) HL.ratio(x, y, conf.level=0.95, alternative="two.sided", ...) Median.diff(x, y, conf.level=0.95, alternative="two.sided", ...) Median.ratio(x, y, conf.level=0.95, alternative="two.sided", ...) HD.diff(x, y, conf.level=0.95, alternative="two.sided", ...) HD.ratio(x, y, conf.level=0.95, alternative="two.sided", ...)
x |
vector of observations in the first sample |
y |
vector of observations in the second sample |
alternative |
character string, either "two.sided", "less" or "greater" |
conf.level |
the comparisonwise confidence level of the intervals, where 0.95 is default |
... |
further arguments to be passed to the individual methods, see details |
Param.diff
calculates the confidence interval for the difference
in means of two Gaussian samples by calling t.test
in package stats,
assuming homogeneous variances if var.equal=TRUE
,
and heterogeneous variances if var.equal=FALSE
(default);
Param.ratio
calculates the Fiellers confidence interval for the ratio
of two Gaussian samples by calling ratio.t.test
in package mratios,
assuming homogeneous variances if var.equal=TRUE
,
and heterogeneous variances if var.equal=FALSE
(default);
Lognorm.diff
calculates the confidence interval for the difference
in means of two Lognormal samples, currently, further arguments (...)
are not used;
Lognorm.ratio
calculates the confidence interval for the ratio
in means of two Lognormal samples, currently, further arguments (...)
are not used;
HL.diff
calculates the Hodges-Lehmann confidence interval for the difference of locations
by calling wilcox.exact
in package exactRankTests ;
HL.ratio
calculates the Hodges-Lehmann-like confidence interval for the ratio of locations
by calling wilcox.exact
in package exactRankTests for the logarithms of observations;
HD.diff
calculates a percentile bootstrap confidence interval for the difference
of “Harrell-Davis” estimates for location using hdquantile
in package Hmisc
and boot.ci
in boot, the number of bootstrap replications can be set
via R=999
(default) ;
HD.ratio
calculates a percentile bootstrap confidence interval for the ratio
of “Harrell-Davis” estimates for location using hdquantile
in package Hmisc
and boot.ci
in package boot, the number of bootstrap replications can be set
via R=999
(default);
Median.diff
calculates a percentile bootstrap confidence interval for the difference
of Medians using boot.ci
in package boot, the number of bootstrap replications can be set
via R=999
(default);
Median.ratio
calculates a percentile bootstrap confidence interval for the ratio
of Medians using boot.ci
in package boot, the number of bootstrap replications can be set
via R=999
(default);
A list containing:
conf.int |
a vector containing the lower and upper confidence limit |
estimate |
a single named value |
Frank Schaarschmidt, Institute of Biostatistics, Leibniz University of Hannover, Germany
Param.diff
uses t.test
in stats.
Param.ratio
with var.equal=TRUE
:
Fieller EC (1954): Some problems in interval estimation.
Journal of the Royal Statistical Society, Series B, 16, 175-185.
Param.ratio
with var.equal=FALSE
:
Tamhane, AC, Logan, BR (2004): Finding the maximum safe dose level for heteroscedastic data.
Journal of Biopharmaceutical Statistics 14, 843-856.
The test is inverted by solving a quadratic equation according to Fieller,
where the estimated ratio is simply plugged in order to get Satterthwaite approximated degrees of freedom.
See also:
Hasler, M, Vonk, R, Hothorn, LA: Assessing non-inferiority of a new treatment in a three arm trial in the presence of heteroscedasticity (submitted).
Lognorm.ratio
and Lognorm.ratio
: Implements the simple large sample solutions presented and compared with improved methods in: Chen, Y-H, Zhou, X-H (2006): Interval estimates for the ratio and the difference of two lognormal means.
Statistics in Medicine 25, 4099-4113.
HL.diff
uses wilcox.exact
in package exactRankTests.
HL.ratio
: Hothorn, T, Munzel, U: Non-parametric confidence interval for the ratio.
Report University of Erlangen, Department Medical Statistics 2002; available via:
http://www.imbe.med.uni-erlangen.de/~hothorn/.
HD.diff
xxx
HD.ratio
xxx
Median.diff
xxx
Median.ratio
xxx
############################################## # Dieldrin example: Two-sample situation: # The dieldrin example data(dieldrin) Ray<-subset(dieldrin, River=="Ray")$dieldrin Thames<-subset(dieldrin, River=="aThames")$dieldrin Ray Thames ## CI for the difference of means, # assuming normal errors and homogeneous variances : thomo<-Param.diff(x=Thames, y=Ray, var.equal=TRUE) # allowing heterogeneous variances thetero<-Param.diff(x=Thames, y=Ray, var.equal=FALSE) ## Fieller CIs for the ratio of means, # also assuming normal errors: Fielhomo<-Param.ratio(x=Thames, y=Ray, var.equal=TRUE) # allowing heterogeneous variances Fielhetero<-Param.ratio(x=Thames, y=Ray, var.equal=FALSE) ## Hodges-Lehmann Intervalls for difference and ratios: HLD<-HL.diff(x=Thames, y=Ray) # allowing heterogeneous variances HLR<-HL.ratio(x=Thames, y=Ray) ## Percentile Bootstrap intervals of Harrell-Davis estimators: HDD<-HD.diff(x=Thames, y=Ray) # allowing heterogeneous variances HDR<-HD.ratio(x=Thames, y=Ray) ## Percentile Bootstrap intervals of Medians: MedianD<-Median.diff(x=Thames, y=Ray) # allowing heterogeneous variances MedianR<-Median.ratio(x=Thames, y=Ray) thomo thetero Fielhomo Fielhetero HLD HLR HDD HDR MedianD MedianR # # # # Lognormal CIs: x<-rlnorm(n=10, meanlog=0, sdlog=1) y<-rlnorm(n=10, meanlog=0, sdlog=1) Lognorm.diff(x=x, y=y) Lognorm.ratio(x=x, y=y)