| Type: | Package |
| Title: | Fuzzy & Randomized Confidence Intervals |
| Version: | 0.1.1 |
| Description: | Contains the methods proposed by Geyer and Meeden (2005) <doi:10.1214/088342305000000340> and Trigo et al. (2025) <doi:10.47749/T/UNICAMP.2025.1500297> to construct fuzzy confidence intervals. Compute and plot the fuzzy membership functions of the methods, and the expected length compared with the infimum. |
| License: | GPL-3 |
| Imports: | DescTools, calculus, ump, zipfR, graphics, stats |
| Encoding: | UTF-8 |
| Suggests: | testthat (≥ 3.0.0) |
| Config/testthat/edition: | 3 |
| Config/roxygen2/version: | 8.1.0 |
| NeedsCompilation: | no |
| Packaged: | 2026-10-03 00:57:21 UTC; bacon |
| Author: | Carlos Henrique Trigo Nasser Felix [aut, cre], Nancy Lopes Garcia [aut], Alex Rodrigo dos Santos Sousa [aut] |
| Maintainer: | Carlos Henrique Trigo Nasser Felix <c214344@dac.unicamp.br> |
| Repository: | CRAN |
| Date/Publication: | 2026-10-03 02:40:08 UTC |
Plot for "psi" type objects.
Description
Plot for "psi" type objects.
Usage
## S3 method for class 'psi'
plot(
x,
...,
gamma = 0.95,
type = "psi",
xlim = NULL,
tlim = NULL,
yval = NULL,
ylim = NULL
)
Arguments
x |
A "psi" type object, list containing the following information.
|
... |
Other objects of the "psi" type. |
gamma |
the confidence level. |
type |
The type of the plot, by default is the menbership function, and "length" for the expected length plot. |
xlim |
A vector containing the upper and lower values for the x-axis of the plot. |
tlim |
A vector containing the upper and lower values for theta. |
yval |
A vector containing the values of omega to be included in the plot. (for type = "psi" only) |
ylim |
A vector containing the upper and lower values for the y-axis of the plot. (for type = "length" only) |
Value
No return value, called for side effects
Examples
x<-psi(distribution = "bernoulli", method = "GM", n = 10)
plot(x)
plot(x, type = "length")
x<-psi(distribution = "bernoulli", method = 0.5, n = 10)
plot(x)
plot(x, type = "length")
Fuzzy & Randomized Confidence Intervals
Description
Function to create "psi" type objects.
Usage
psi(distribution = "bernoulli", method = "GM", n = 1, sigma = 1)
Arguments
distribution |
name of the distribution of the sample.
|
method |
numeric value or name of the method that defines how obtain confidence intervals.
|
n |
sample size. |
sigma |
standard deviation (for the case of normal distribution). |
Value
A list containing the following information.
- [[1]]
the membership function
- [[2]]
distribution
- [[3]]
n
- [[4]]
method
- [[5]]
sigma
- [[6]]
the upper and lower bound function of the support of the membership function.
References
FELIX, Carlos Henrique Trigo Nasser, Garcia, Nancy Lopes & Sousa, Alex Rodrigo dos Santos. (2025). Uma Nova Abordagem para Construção de Intervalos de Confiança Aleatorizados (Master's thesis, Universidade Estadual de Campinas, Campinas).
GEYER, C. J.; MEEDEN, G. D. Fuzzy and randomized confidence intervals and p-values. Statistical Science, v. 20, n. 4, p. 358–366, 2005. ISSN 08834237. Disponível em: http://www.jstor.org/stable/20061193.
Examples
x<-psi(distribution = "bernoulli", method = "GM", n = 10)
x[[1]](0.3,2)
x[[2]]
x[[3]]
x[[4]]
x[[5]]
x[[6]](2)
x<-psi(distribution = "bernoulli", method = 0.5, n = 10)
x[[1]](0.6,8)
x[[2]]
x[[3]]
x[[4]]
x[[5]]
x[[6]](8)