Description Usage Arguments Value Author(s) Examples
View source: R/create_fframe.R
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.
1 2 | create_fframe(indata, timestamps, panel_ind = colnames(indata[, 1:2]),
overwrite = FALSE)
|
indata |
|
timestamps |
|
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 |
A data.frame
with empty rows added.
Michal Oleszak
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.