The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.

QQreflimits

The goal of QQreflimits is to provide routines for finding reference limits using, where appropriate, QQ methodology. All use a data vector X of cases from the reference population. The default is to get the central 95% reference range of the population, namely the 2.5 and 97.5 percentiles.

Installation

You can install the development version of QQreflimits like so:

install.packages("QQreflimits")  # once available on CRAN

Example

This is a basic example which shows you how to solve a common problem:

library(QQreflimits)

# parameters
mu    <- 40
sigma <- 10
n     <- 120
# identifying winsoring
wins  <- trunc(n/40)
# replicable randomization
set.seed(1069)
X     <- mu + sigma*rnorm(n)
# replicable randomization with heavy tails
set.seed(1069)
HT    <- mu + sigma * rt(n, 5)

# visual settings
par(mfrow=c(2,2))
par(oma=c(0,0,2,0))
# plot to compare
base <- QQnorm(X, main="Base normal", showsum=TRUE)
title("Illustrating QQnorm with para_limits", outer=TRUE)
basew <- QQnorm(X, main="Winsorized", winsor=wins, showsum=TRUE)
ht   <- QQnorm(HT, main="Heavy tail", showsum=TRUE)
htw  <- QQnorm(HT, main="Winsorized", winsor=wins, showsum=TRUE)


# evaluate and review
norm_results <- para_limits(mean(X), sd(X), n)
norm_results
#> $lower
#> [1] 20.21278 17.57878 22.84678
#> 
#> $upper
#> [1] 60.44854 57.81454 63.08255
#> 
#> $effn
#> [1] 120
# evaluate and review with tails
tailed_results <- para_limits(htw$intercept, htw$slope, n, winsor=wins)
tailed_results
#> $lower
#>             ns[QQrange] ns[QQrange] 
#>    19.14649    16.25381    22.03916 
#> 
#> $upper
#>             ns[QQrange] ns[QQrange] 
#>    61.35614    58.46346    64.24881 
#> 
#> $effn
#> [1] 109.5

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.