| Type: | Package | 
| Title: | Distribution-Free Confidence Region | 
| Version: | 1.5.1 | 
| Date: | 2018-06-13 | 
| Author: | Zhiqiu Hu, Rong-cai Yang | 
| Maintainer: | Zhiqiu Hu <zhiqiu.hu@gmail.com> | 
| Description: | Constructs confidence regions without the need to know the sampling distribution of bivariate data. The method was proposed by Zhiqiu Hu & Rong-cai Yang (2013) <doi:10.1371/journal.pone.0081179.g001>. | 
| Depends: | R (≥ 2.10) | 
| License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] | 
| URL: | http://statgen.ualberta.ca | 
| RoxygenNote: | 6.0.1 | 
| NeedsCompilation: | no | 
| Packaged: | 2018-06-15 14:10:34 UTC; statgen | 
| Repository: | CRAN | 
| Date/Publication: | 2018-06-15 14:21:16 UTC | 
Distribution-free confidence region (distfree.cr)
Description
The disfree.cr package was developed to implement a novel geometry-based method introduced by Zhiqiu Hu and Rong-cai Yang for constructing confidence regions without the need to know the sampling distribution of estimated parameters for two or more variables.
Details
| Package: | distfree.cr | 
| Type: | Package | 
| Version: | 1.0 | 
| Date: | 2012-11-23 | 
| License: | GPL (>2.0) | 
Author(s)
Zhiqiu Hu and Rong-cai Yang
Maintainer: Zhiqiu Hu <zhiqiu.hu@gmail.com>
distfree.cr
Description
Constructs empirical confidence regions for bivariate data based on the method proposed by Zhiqiu Hu and Rong-cai Yang(2013) <doi:10.1371/journal.pone.0081179.g001>.
Usage
distfree.cr(x, y, alpha = 0.05, alpha.min.diff = 0.5/NROW(x), nknots = 40, 
            xlab = deparse(substitute(x)), ylab = deparse(substitute(y)), 
            col = c("red", "black", "gray"), draw = T)
Arguments
| x | numeric vector, of dimensions nobs * 1. If a data frame or a two-column numeric matrix of x and y is supplied here, the second option  | 
| y | numeric vector, of dimensions nobs * 1. This option needs to be ignored if users provided both x and y in the first option of the function. | 
| alpha | Significant level. By default  | 
| alpha.min.diff | minimum difference is allowed for calculating confidence region. This option is not suggested for most users. The default value is set to be  | 
| nknots | number of knots that will be used to enclose the confidence region. The default value  | 
| xlab | define the label of x axis of the plot. | 
| ylab | define the label of y axis of the plot. | 
| col | define colors of the scatter points and lines of the plot. The default setting  | 
| draw | a logical indicator. Users may disable plotting by setting the option to  | 
Details
This function constructs a distribution-free confidence region based on the method proposed by Zhiqiu Hu and Rong-cai Yang.
Value
| alpha.realized | Realized-alpha, which is defined as the proportion of the total points outside the confidence region. | 
| polygon | 'data.frame' of x,y providing the apexes of the lines. | 
| polygon.smooth1 | 'data.frame' of x,y providing the apexes of the smoothed polygon 1. | 
| polygon.smooth2 | 'data.frame' of x,y providing the apexes of the smoothed polygon 2. | 
| data | 'data.frame', of dimension nobs * 3, the first two columns are input data of x and y values and the third column  | 
| alpha,xlab,ylab,col | values assigned by users. | 
Note
A smooth confidence region can be achieved by setting up a big number for input variable nknots, and this in turn requires large sample sizes.
Author(s)
Zhiqiu Hu and Rong-cai Yang
Examples
library(distfree.cr)
dat=data.frame(x=c(rnorm(3000), rnorm(3000, mean=1, sd=2.5)), 
               y=c(rnorm(3000), rnorm(3000, mean=1, sd=2.5)))
pt=distfree.cr(dat, draw=TRUE, alpha=0.05)
pt=distfree.cr(x=dat$x, y=dat$y, draw=FALSE)
plot(pt)
plot.distfree.cr
Description
Plot an object that is returned by the distfree.cr function.
Usage
## S3 method for class 'distfree.cr'
plot(x, show.points = T, ...)
Arguments
| x | An object returned by the distfree.cr function. | 
| show.points | A logical indicator of whether or not the original data are plotted. | 
| ... | Other parameters that can be passed to the  |