create_fframe: Add empty rows with time stamps to each cress-sectional unit...

Description Usage Arguments Value Author(s) Examples

View source: R/create_fframe.R

Description

Creates a forecast frame as required by the predict.pmpp() method. To each cross-sectional unit in the data, a specified number of rows are added that contain only this unit's ID and the selected time ID.

Usage

1
2
create_fframe(indata, timestamps, panel_ind = colnames(indata[, 1:2]),
  overwrite = FALSE)

Arguments

indata

data.frame with a panel structure

timestamps

vector of time IDs for the added time periods

panel_ind

vector of length 2 indicating names of variables indexing units and time periods respectively

overwrite

logical; if TRUE, existing rows in the data are overwritten with empty rows if their time ID is in timestamps

Value

A data.frame with empty rows added.

Author(s)

Michal Oleszak

Examples

1
2
3
data(EmplUK, package = "plm")
EmplUK <- dplyr::filter(EmplUK, year %in% c(1978, 1979, 1980, 1981, 1982))
my_fframe <- create_fframe(EmplUK, 1983)

veneficusnl/pmpp documentation built on Oct. 16, 2019, 11:22 a.m.