rconint: Rearrangement of Simultaneous Confidence Intervals

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Uses rearrangement to apply the rearrangement operator to objects of class conint.

Usage

1
rconint(x, n = 100, stochastic = FALSE, avg = TRUE)

Arguments

x

object of class conint

n

an integer denoting the number of sample points desired

stochastic

logical. If TRUE, stochastic sampling will be used

avg

logical. If TRUE, the average rearrangement will be computed and outputed

Details

Implements the rearrangement operator of rearrangement on simultaneous confidence intervals. Intended for use on output of simconboot.

Value

An object of class conint with the following elements:

x

the original x data

y

the original y data

sortedx

the original x data, sorted with repeated elements removed

Lower

the rearranged lower end-point function. Represented as a vector of values corresponding to sortedx

Upper

the rearranged upper end-point function. Represented as a vector of values corresponding to sortedx

cef

the corresponding estimates

Author(s)

Wesley Graybill, Mingli Chen, Victor Chernozhukov, Ivan Fernandez-Val, Alfred Galichon

References

Chernozhukov, V., I. Fernandez-Val, and a. Galichon. 2009. Improving point and interval estimators of monotone functions by rearrangement. Biometrika 96 (3): 559-575.

Chernozhukov, V., I. Fernandez-Val, and a. Galichon. 2010. Quantile and Probability Curves Without Crossing. Econometrica 78(3): 1093-1125.

See Also

simconboot, rearrangement

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
## Not run: 
data(GrowthChart)
attach(GrowthChart)

nage <- 2 * pi * (age - min(age)) / (max(age) - min(age))
formula <- height ~ I(sin(nage))+I(cos(nage))+I(sin(2*nage))+I(cos(2*nage))+
            I(sin(3*nage))+I(cos(3*nage))+I(sin(4*nage))+I(cos(4*nage))
j <- simconboot(nage,height,lm,formula)
k <- rconint(j)
plot(k, border=NA, col='darkgray',xlab = 'Age (years)',ylab = 'Height (cms)',xaxt = "n")
axis(1, at = seq(-2*pi*min(age)/(max(age)-min(age)), 
        2*pi+1,by=5*2*pi/(max(age)-min(age))), label = seq(0, max(age)+1, by=5))
polygon.conint(j, border=NA, col='lightgray')
polygon.conint(k, border=NA, col='darkgray', density=50)
points(nage,height,col='gray80')
legend(min(nage),max(height),c("95% CI Original",
       "95% CI  Rearranged"),lty=c(1,1),lwd=c(2,2),
       col=c("lightgray","darkgray"),bty="n");
detach(GrowthChart)

## End(Not run)

Rearrangement documentation built on May 1, 2019, 11:29 p.m.