dt_gen_panel: Transfer Panel Data

Description Usage Arguments Value

View source: R/dt_gen_panel.R

Description

Transfer Panel Data

Usage

1
dt_gen_panel(regdata, indx = c("id", "year"), s = 1, plag = 1, yname = FALSE)

Arguments

regdata

a data frame, either a time series or panal data

indx

if regdata is time series, indx is NULL. If regdata is panal data, indx is a character string vector whose length is 2, the 1st element is coloumn name of individual id, and the 2nd element is coloumn names of time.

s

a horizon in local projections, default is 1.

plag

lag order of VAR.

yname

logical, whether return the name of dependent variables.

Value

if yname is FALSE, return a data.frame include indepedent variables and depedent variables in VAR. If yname is TRUE, returen a list, the 1st element is data.frame, the 2nd element is names of dependent variables.


common2016/VARrf documentation built on July 27, 2020, 2:41 a.m.