Learn R Programming

DIMORA (version 0.3.6)

predict.Dimora: Predict method for Dimora objects

Description

Prediction of test data using any model of the package.

Usage

# S3 method for Dimora
predict(object, ..., newx)

Value

The method returns a vector of predicted values.

Arguments

object

an object of class Dimora, as that created by BM, GBM or GGM.

newx

a number or a vector of numeric values rapresenting the time window (see Example below).

...

additional arguments affecting the predictions produced.

Details

It works only for univariate models; specifically, for the models BM, GBM, GGM, it returns a vector of the cumulative predicted values.

See Also

The Dimora models: BM, GBM, GGM, UCRCD.

summary.Dimora for summaries.

plot.Dimora for graphics and residuals analysis.

make.instantaneous to create instantaneous series from the cumulative one.

Examples

Run this code
data(DBdimora)
iphone <- DBdimora$iPhone[7:52]
M1 <- BM(iphone)

# Predict the values of the observed series (lenght(iphone)=46)
predict.Dimora(M1, newx = c(1:46))


# Predict the values of the observed series and other 34 future values
predict.Dimora(M1, newx = c(1:80))

Run the code above in your browser using DataLab