Learn R Programming

Rfit (version 0.14)

confintadjust: Confidence interval adjustment methods

Description

Returns the critical value to be used in calculating adjusted confidence intervals. Currently provides methods for Boneferroni and Tukey for confidence interval adjustment methods as well as no adjustment.

Usage

confintadjust(n, k, alpha = 0.05, method = confintadjust.methods, ...)

Arguments

n
sample size
k
number of comparisons
alpha
overall (experimentwise) type I error rate
method
one of confintadjust.methods
...
Additonal arguments. Currently not used.

Value

  • cvcritical value
  • methodthe method used

Details

Returns critial value based on one of the adjustment methods.

References

Hettmansperger, T.P. and McKean J.W. (2011), Robust Nonparametric Statistical Methods, 2nd ed., New York: Chapman-Hall.

Examples

Run this code
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function(n,k,alpha=0.05,method=confintadjust.methods,...) {
	method<-match.arg(method)
	cv<-switch(method, bonferroni = qt(1-alpha/choose(k,2),n-k),
		tukey = qtukey(1-alpha,k,n-k)/sqrt(2),
		none = qt(1-alpha/2,n-k)
	)

	res<-list(cv=cv,method=method)
	res

  }

Run the code above in your browser using DataLab