pairwiseCImethodsCont: Confidence intervals for two sample comparisons of continuous...

Description Usage Arguments Details Value References Examples

Description

Confidence interval methods available for pairwiseCI for comparison of two independent samples. Methods for continuous variables.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
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", sim=10000, ...)
Lognorm.ratio(x, y, conf.level=0.95, alternative="two.sided", sim=10000, ...)

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", ...)

Arguments

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

sim

a single integer value, specifying the number of samples to be drawn for calculation of the empirical distribution of the generalized pivotal quantities

...

further arguments to be passed to the individual methods, see details

Details

Value

A list containing:

conf.int

a vector containing the lower and upper confidence limit

estimate

a single named value

References

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
data(sodium)

iso<-subset(sodium, Treatment=="xisogenic")$Sodiumcontent
trans<-subset(sodium, Treatment=="transgenic")$Sodiumcontent

iso
trans

## CI for the difference of means, 
# assuming normal errors and homogeneous variances :

thomo<-Param.diff(x=iso, y=trans, var.equal=TRUE)

# allowing heterogeneous variances
thetero<-Param.diff(x=iso, y=trans, var.equal=FALSE)


## Fieller CIs for the ratio of means,
# also assuming normal errors:

Fielhomo<-Param.ratio(x=iso, y=trans, var.equal=TRUE)

# allowing heterogeneous variances

Fielhetero<-Param.ratio(x=iso, y=trans, var.equal=FALSE)


HLD<-HL.diff(x=iso, y=trans)

thomo
thetero

Fielhomo
Fielhetero

HLD


# # #

# 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)

 

pairwiseCI documentation built on May 1, 2019, 6:51 p.m.