##############################################
# 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)Run the code above in your browser using DataLab