predP: Prediction point for future observations

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Construct a prediction point for future observations from any continuous distribution. Generic method is print.

Usage

1
2
3
4
predP(data, dist, no, n, order=NULL, start=NULL, conf=0.95)

## S3 method for class 'predP'
print(x, ...)

Arguments

data

A numeric vector

dist

A character string "name" naming a distribution for which the corresponding density function dname, the corresponding distribution function pname and the corresponding quantile function qname must be defined.

no

A numeric vector for the number of the next observations. The length of this vector plus the length of the data must be less than or equal the length of all data.

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 "predI".

...

Further argument to be passed to generic function

Details

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, predP computes the prediction point(s) for the future observation(s).

Value

predP returns an object of class "predP", a list with the following components:

data

the new data with new observations.

newobs

the new observations.

ns

the rank of the new observations.

no

the number of the next observations.

distname

the name of the distribution.

ld

the length of the data.

n

the length of all the data.

Generic function:

print

The print of a "predP" object shows the prediction point(s) for the future observation(s).

Author(s)

H. M. Barakat, O. M. Khaled and Hadeer A. Ghonem.

References

Delignette-Muller ML and Dutang C (2015), fitdistrplus: An R Package for Fitting Distributions. Journal of Statistical Software, 64(4), 1-34.

H. M. Barakat, Magdy E. El-Adll, 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, 1-13.

H. M. Barakat, O. M. Khaled and Hadeer A. ghonem (2018), Predicting future lifetime based on random number for mixture exponential distribution. International conference of mathematics and its applications (ICMA18), April, 2018, Cairo, Egypt.

See Also

bestfit, predI.

Examples

1
2
3
4
5
# prediction point for the next observations based on gamma distribution
#
set.seed(123)
x1 <- rgamma(10, 4, 2)
predP(x1, "gamma", 8, 20)

PredictionR documentation built on May 2, 2019, 9:35 a.m.