Title: | Nonparametric Predictive Inference |
---|---|
Description: | An implementation of the Nonparametric Predictive Inference approach in R. It provides tools for quantifying uncertainty via lower and upper probabilities. It includes useful functions for pairwise and multiple comparisons: comparing two groups with and without terminated tails, selecting the best group, selecting the subset of best groups, selecting the subset including the best group. |
Authors: | Tahani Coolen-Maturi [cre, aut] |
Maintainer: | Tahani Coolen-Maturi <[email protected]> |
License: | GPL-3 |
Version: | 0.1.0 |
Built: | 2025-02-17 05:00:51 UTC |
Source: | https://github.com/cran/NPIstats |
NPI lower and upper probabilities for the event that the next future observation from group Y is larger than the next future observation from group X.
best.pair(X, Y)
best.pair(X, Y)
X |
numeric vector of data values |
Y |
numeric vector of data values, to check if it is the best group |
NPI lower and upper probabilities for the event that the next future observation from group Y is larger than the next future observation from group X.
F.P.A. Coolen (1996). Comparing two populations based on low stochastic structure assumptions. Statistics & Probability Letters 29, 297-305.
data(BreakdownTimes) data2<-split(BreakdownTimes$times, BreakdownTimes$group) # No terminated tails, complete data best.pair(data2$X, data2$Y)
data(BreakdownTimes) data2<-split(BreakdownTimes$times, BreakdownTimes$group) # No terminated tails, complete data best.pair(data2$X, data2$Y)
NPI lower and upper probabilities for the event that the next future observation from group Y is larger than the next future observation from group X. The information available consists of precise measurements of real-valued data only within a specific range, between the cut points, where the numbers of observations to the left and to the right of this range available.
best.pair.tt(X, Y, Lx = -Inf, Ux = Inf, Ly = -Inf, Uy = Inf)
best.pair.tt(X, Y, Lx = -Inf, Ux = Inf, Ly = -Inf, Uy = Inf)
X |
numeric vector of data values |
Y |
numeric vector of data values, to check if it is the best group |
Lx |
numeric value, lower cut point for group X, default set to -Inf |
Ux |
numeric value, upper cut point for group X, default set to Inf |
Ly |
numeric value, lower cut point for group Y, default set to -Inf |
Uy |
numeric value, lower cut point for group Y, default set to Inf |
NPI lower and upper probabilities for the event that the next future observation from group Y is larger than the next future observation from group X.
T.A. Maturi, P. Coolen-Schrijner and F.P.A. Coolen (2009). Nonparametric predictive pairwise comparison with terminated tails. International Journal of Approximate Reasoning, 51(1), 141-150.
data(BreakdownTimes) data2<-split(BreakdownTimes$times, BreakdownTimes$group) # No terminated tails, complete data best.pair.tt(data2$X, data2$Y) # terminated tails with Ly = 0.5, Uy = 4 and Ux = 10, but as Lx is not given then Lx=-Inf best.pair.tt(data2$X, data2$Y, Ux = 10, Ly = 0.5, Uy = 4)
data(BreakdownTimes) data2<-split(BreakdownTimes$times, BreakdownTimes$group) # No terminated tails, complete data best.pair.tt(data2$X, data2$Y) # terminated tails with Ly = 0.5, Uy = 4 and Ux = 10, but as Lx is not given then Lx=-Inf best.pair.tt(data2$X, data2$Y, Ux = 10, Ly = 0.5, Uy = 4)
Data set on Birthweights for 12 male and 12 female babies as presented by Dobson (1983, p.14).
data(BirthWeights)
data(BirthWeights)
An object of class "data.frame"
male or female
BirthWeights for 12 male and 12 female babies
Dobson, A.J. (1983). Introduction to Statistical Modelling. Chapman and Hall, London, p.14.
data(BirthWeights) head(BirthWeights)
data(BirthWeights) head(BirthWeights)
We consider a data set used by Nelson (1982, p.462), which gives the breakdown times of units from 6 different groups. In this data set, only the first two groups are used to illustrate the NPI method for pairwise comparison with tails termination. Both groups consist of 10 observations. The first unit of group X has a reported breakdown time of 0.00, we interpret this as a very small but positive breakdown time.
data(BreakdownTimes)
data(BreakdownTimes)
An object of class "data.frame"
group X or Y
Breakdown times
Nelson W. (1982). Applied Life Data Analysis. New York, Wiley, p.462.
data(BreakdownTimes) head(BreakdownTimes)
data(BreakdownTimes) head(BreakdownTimes)
This data set is presented by Box et al. (1978, p. 159), where a chemical reaction was studied by making 10 runs with a standard method X, and 10 runs with a new, supposedly improved method Y.
data(ChemicalReaction)
data(ChemicalReaction)
An object of class "data.frame"
Method X or Y
Chemical reaction values
Box, G.E.P, Hunter, W.G. and Hunter, J.S. (1978). Statistics for Experimenters: An Introduction to Design, Data Analysis and Model Building. New York, Wiley, p.159.
data(ChemicalReaction) head(ChemicalReaction)
data(ChemicalReaction) head(ChemicalReaction)
This data set is used by Coolen and van der Laan (2001) to introduce NPI for multiple comparisons.
data(FourSources)
data(FourSources)
An object of class "data.frame"
Source A, B, C or D
values given for these sources
Coolen F.P.A. and van der Laan P. (2001). Imprecise predictive selection based on low structure assumptions. Journal of Statistical Planning and Inference, 98(1-2), 259–277.
data(FourSources) head(FourSources)
data(FourSources) head(FourSources)
An implementation of the Nonparametric Predictive Inference approach in R. It provides tools for quantifying uncertainty via lower and upper probabilities. It includes useful functions for pairwise and multiple comparisons: comparing two groups with and without terminated tails, selecting the best group, selecting the subset of best groups, selecting the subset including the best group.
Nonparametric Predictive Inference (NPI) is a statistical method which uses few modelling assumptions, enabled by the use of lower and upper probabilities to quantify uncertainty. NPI has been presented for many problems in Statistics, Risk and Reliability and Operations Research. NPI approach is based on Hill’s assumption A(n), which gives a direct conditional probability for a future observable random quantity, conditional on observed values of related random quantities. Inferences based on A(n) are predictive and nonparametric, and can be considered suitable if there is hardly any knowledge about the random quantity of interest, other than the n observations, or if one does not want to use such information, e.g. to study effects of additional assumptions underlying other statistical methods. A(n) is not sufficient to derive precise probabilities for many events of interest, but it provides optimal bounds for probabilities for all events of interest involving the next future observation. These bounds are lower and upper probabilities in the theories of imprecise probability and interval probability, and as such they have strong consistency properties. NPI is a framework of statistical theory and methods that use these A(n)-based lower and upper probabilities, and also considers several variations of A(n) which are suitable for different inferences. For more info, visit NPI webpage.
Augustin, T. and Coolen, F.P.A. (2004). Nonparametric predictive inference and interval probability. Journal of Statistical Planning and Inference 124, 251-272.
Coolen, F.P.A. (1998). Low structure imprecise predictive inference for Bayes’ problem. Statistics & Probability Letters 36, 349-357.
Coolen, F.P.A. and van der Laan, P. (2001). Imprecise predictive selection based on low structure assumptions. Journal of Statistical Planning and Inference 98, 259-277.
Coolen, F.P.A. (1996). Comparing two populations based on low stochastic structure assumptions. Statistics & Probability Letters 29, 297-305.
Hill, B.M. (1968). Posterior distribution of percentiles: Bayes’ theorem for sampling from a population. Journal of the American Statistical Association 63, 677-691.
Weichselberger K. (2000). The theory of interval-probability as a unifying concept for uncertainty. International Journal of Approximate Reasoning, 24(2-3), 149–170.
NPI lower and upper probabilities for the event that the next future observations from groups S are greater than all future observations from the other groups.
select.best.groups(data, S)
select.best.groups(data, S)
data |
a list of numeric data vectors |
S |
a vector of indices of the groups in the data list to be considered as the subset of best groups |
NPI lower and upper probabilities for the event that the next future observations from groups S are greater than all future observations from the other groups.
# NPI lower and upper probabilities for the event that # the next future observations from groups 1 and 3 are greater than # all future observations from the other groups. data(FourSources) # Convert the dataframe to a list of groups data2<-split(FourSources$value,FourSources$source) select.best.groups(data2,S=c(1,3))
# NPI lower and upper probabilities for the event that # the next future observations from groups 1 and 3 are greater than # all future observations from the other groups. data(FourSources) # Convert the dataframe to a list of groups data2<-split(FourSources$value,FourSources$source) select.best.groups(data2,S=c(1,3))
NPI lower and upper probabilities for the event that at least one of the next future observations from groups S is greater than all future observations from the other groups.
select.include.best(data, S)
select.include.best(data, S)
data |
a list of numeric data vectors |
S |
a vector of indices of the groups in the data list to be considered as the subset of groups that includes the best group. |
NPI lower and upper probabilities for the event that at least one of the next future observations from groups S is greater than all future observations from the other groups.
# NPI lower and upper probabilities for the event that at least one # of the next future observations from groups S is greater than all # future observations from the other groups. data(FourSources) # Convert the dataframe to a list of groups data2<-split(FourSources$value,FourSources$source) select.include.best(data2,S=c(1,3))
# NPI lower and upper probabilities for the event that at least one # of the next future observations from groups S is greater than all # future observations from the other groups. data(FourSources) # Convert the dataframe to a list of groups data2<-split(FourSources$value,FourSources$source) select.include.best(data2,S=c(1,3))
NPI lower and upper probabilities for the event that the next future observation from one (the Sth) group is greater than all future observations from the other groups.
select.the.best(data, S)
select.the.best(data, S)
data |
a list of numeric data vectors |
S |
an index of the group in the data list to be considered as the best group |
NPI lower and upper probabilities for the event that the next future observation from the Sth group is greater than all future observations from the other groups.
# NPI lower and upper probabilities for the event that # the next future observation from group 2 is greater # than all future observations from the other groups. data(FourSources) # Convert the dataframe to a list of groups data2<-split(FourSources$value,FourSources$source) select.the.best(data2, 2)
# NPI lower and upper probabilities for the event that # the next future observation from group 2 is greater # than all future observations from the other groups. data(FourSources) # Convert the dataframe to a list of groups data2<-split(FourSources$value,FourSources$source) select.the.best(data2, 2)