gendata: Generate the panel data for two simulation settings

Description Usage Arguments Details Value Note Author(s) References See Also Examples

Description

Generate the panel data with 2 covariates for two simulation settings

Usage

1
  gendata(N, TT, seed, set = 1, r= 0.5)

Arguments

N

a positive integer, the sample size of panel data.

TT

a positive integer, the length of observational time.

seed

an integer, specify the random seed for data reproducibility.

set

an integer with 1 or 2, specify which setting is to be used, (optional ) default as 1.

r

a value between 0 and 1, specify the autoregression coefficient of X_jt, (optional) default as 0.5.

Details

The specific simulation settings are referred in the reference.

Value

return a list including the following components,

Yit

a N x TT matrix, the observational value of response variable on panel data.

Xit

a 3-dim N x TT x 2 array, the observational value of covariates on panel data, the 1st index is sample index, the 2nd index is time index, the 3rd variable index.

gt0

an integer, specify the random seed for data reproducibility.

gamma1t0

an integer with 1 or 2, specify which setting is to be used, (optional ) default as 1.

gamma2t0

a value between 0 and 1, specify the autoregression coefficient of X_jt, (optional) default as 0.5.

ft0
beta1t0
beta2t0

Note

Nothing

Author(s)

Wei Liu

References

Huazhen Lin, Hyokyoung G. Hong, Baoying Yang, Wei Liu, Yong Zhang, Gang-Zhi Fan, Yi Li (2019). Nonparametric time-varying coefficient models for panel data: Study of collection rate of public pension contributions. Statistics in Biosciences.

See Also

Nothing

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
  N <- 100; TT<-5;
  datalist <- gendata(N, TT, seed=1)
  ##
  N <- 100; TT<-10;
  datalist <- gendata(N, TT, seed=1)
  Yit <- datalist$Yit
  Xit <- datalist$Xit
  ###
  ##
  N <- 100; TT<-10;
  datalist <- gendata(N, TT, seed=1, set=2)
  Yit <- datalist$Yit
  Xit <- datalist$Xit

feiyoung/nptvcmPD documentation built on July 6, 2019, 12:05 a.m.