Learn R Programming

pmpp (version 0.1.1)

predict.pmpp: Compute forecasts with a PMPP model

Description

Compute forecasts with a PMPP model

Usage

# S3 method for pmpp
predict(object, fframe = NULL, iter = NULL, ...)

Arguments

object

an object of class pmpp()

fframe

data.frame with the same columns as input data to model, but with empty rows added to each cross-sectional unit, as created by create_fframe()

iter

iterating constant, to be used in a loop when extraction from call is needed

...

other arguments passed to the method

Value

A data.frame with predicted and true values.

Examples

Run this code
# NOT RUN {
data(EmplUK, package = "plm")
EmplUK <- dplyr::filter(EmplUK, year %in% c(1978, 1979, 1980, 1981, 1982))
pmpp_model <- pmpp(dep_var = "emp", data = EmplUK)
my_fframe <- create_fframe(EmplUK, 1983:1985)
prediction <- predict(pmpp_model, my_fframe)
# }

Run the code above in your browser using DataLab