Stochastic Approximation Confidence Interval for Correlation

Implements stochastic approximation method for constructing nonparametric confidence intervals for correlation coefficient, based on Xiong & Xu (2016).


saCI: Stochastic Approximation Confidence Interval for Correlation

An R package implementing the stochastic approximation method for constructing nonparametric confidence intervals for Pearson's correlation coefficient, based on Xiong & Xu (2016).

Installation

# Install from CRAN (once available)
install.packages("saCI")

# Or install development version from GitHub
# remotes::install_github("USERNAME/saCI")

Usage

library(saCI)

# Generate sample data
set.seed(42)
x <- rnorm(30)
y <- x + rnorm(30, sd = 0.5)

# Calculate confidence interval
result <- corrCI_sa(x, y)
print(result)

Features

  • Stochastic Approximation CI: Implements the SA method from Xiong & Xu (2016)
  • Bootstrap BCa Comparison: Built-in Bootstrap BCa method for comparison
  • Interactive Shiny App: Explore the method interactively
  • Simulation Studies: Built-in Monte Carlo simulation for coverage studies

Shiny App

Run the interactive Shiny app:

saCI::runShinyApp()
# or
shiny::runApp(system.file("shinyapp", package = "saCI"))

Method

This package implements the stochastic approximation algorithm for constructing confidence intervals without requiring large-scale resampling. The algorithm uses recursive Monte Carlo to find the quantiles of the sampling distribution.

References

  • Xiong, C. and Xu, J. (2016). Confidence intervals from stochastic approximation. Communications in Statistics – Simulation and Computation, 45, 1827-1837.

License

GPL (>= 3)

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("saCI")

0.1.0 by Pengyu Chen Group1, 5 months ago


Browse source code at https://github.com/cran/saCI


Authors: Pengyu Chen Group1 [aut, cre]


Documentation:   PDF Manual  


GPL (>= 3) license


Imports boot, MASS, mvtnorm

Suggests testthat, shiny


See at CRAN