Description Usage Arguments Details Value Author(s) References See Also Examples
Construct a prediction interval (PCI) for future observations from any continuous distribution. Generic method is print
.
1 2 3 4 
data 
A numeric vector 
dist 
A character string 
s 
A numeric vector for the order of the next observation. The length of this vector must be equal to 1. 
n 
A numeric vector for the size of all data. 
order 
A numeric vector for the moment order(s). The length of this vector must be equal to the number of parameters to estimate. This argument may be omitted(default) for some distributions for which reasonable order are computed. 
start 
A named list giving the initial values of parameters of the named distribution. This argument may be omitted(default) for some distributions for which reasonable starting values are computed. 
conf 
Confidence level for the test. 
x 
An object of class 
... 
Further argument to be passed to generic function 
The dist argument is assumed to specify the distribution by the probability density function, the commulative distribution function and the quantile function (d, p, q).
By default, best fitting of the data based on maximum likelihood (mle) and moment matching (mme) methods is performed.
once the parameter(s) is(are) estimated, predI computes the prediction interval (PCI) for the future observation.
This function will be called directly in predP
.
predI
returns an object of class "predI"
, a list with the following components:
interval 
the prediction interval. 
lower 
the lower bound of the interval. 
upper 
the upper bound of the interval. 
distname 
the name of the distribution. 
r 
the length of the data. 
s 
the order of the next observation. 
n 
the length of all the data. 
parameters 
the parameter estimate. 
Generic function:
print
The print of a "predI"
object shows few traces about the parameters and the prediction interval.
H. M. Barakat, O. M. Khaled and Hadeer A. Ghonem.
DelignetteMuller ML and Dutang C (2015), fitdistrplus: An R Package for Fitting Distributions. Journal of Statistical Software, 64(4), 134.
H. M. Barakat, Magdy E. ElAdll, Amany E. Aly (2014), Prediction intervals of future observations for a sample random size from any continuous distribution. Mathematics and Computers in Simulation, volume 97, 113.
1 2 3 4 5 6 7 8 9 10 11 12 13  # (1) prediction interval for the next observations based on normal distribution
#
set.seed(123)
x1 < rnorm(15, 2, 4)
predI(x1, "norm", 16, 25)
# (2) prediction interval for the next observations based on weibull distribution
#
library(actuar)
set.seed(123)
x2 < rweibull(16 , 2 , 3)
predI(x2, "weibull", 20, 20 )

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.