pmpp: Posterior Mean Panel Predictor for dynamic panel modelling

Description Usage Arguments Details Value Author(s) References Examples

View source: R/pmpp.R

Description

This function estimates parameters of the Posterior Mean Panel Predictor (PMPP) model based on an empirical-Bayes approach to obtain unit-specific fixed effects.

Usage

1
2
3
4
5
pmpp(dep_var, data, panel_ind = colnames(data[, 1:2]), exp_var = NULL,
  csi_var = NULL, post_mean_method = "gaussian",
  common_par_method = "QMLE", optim_method = "quadratic",
  dens_grid = 2^10, gmm_model = "twosteps", gmm_inst = 99,
  pure_data = FALSE)

Arguments

dep_var

character string indicating name of dependent variable

data

data.frame or matrix with input data

panel_ind

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

exp_var

vector of character strings indicating names of exogeneous explanatory variables

csi_var

vector of character strings indicating names of cross-sectionally invariant explanatory variables; feature not supported yet

post_mean_method

method for estimating the heterogeneous intercept parameters, one of "gaussian", "kernel"

common_par_method

method for estimating the common parameters, one of "QMLE", "GMM_ABond", "GMM_BBond", GMM_ABover", "GMM_SSYS"

optim_method

which optimisation routine to use, one of "gradient", "quadratic", "annealing"

dens_grid

size of the grid over which data is interpolated for kernel density estimation; larger value may yield higher accuracy, but increases computation time

gmm_model

number of steps for computing optimal GMM matrix, one of "onestep", "twosteps", "threesteps"; "threesteps" can be used for "GMM_SSYS" only

gmm_inst

number of lagged values of the dependent variable to be used as GMM instruments in Arellano-Bond/Blundell-Bond setting

pure_data

if TRUE, removes indexing/subsetting from model's call on data, facilitating use in a loop

Details

The PMPP model is a two-step procedure. First, the homogeneous parameters are estimated using one of the QMLE or GMM-based methods:

Parameter common_par_method can be used to select the method for common parameters estimation. All the above methods only provide estimates of the homogeneous parameters, i.e. the ones measuring impact of lagged response and external variables. The intercept is removed in the estimation process. In the second step of the PMPP modelling, the individual-specific intercept is calculated based on the formula for posterior mean (Tweedie's Formula). It involves approximating certain density function, which can be done in two ways:

Parameter post_mean_method can be used to select the method used for intercept estimation. For technical details on the methods, see the references.

Value

An object of class pmpp; a list with parameter estimates, fitted values, residuals, in-sample error measures and information on the data and function call.

Author(s)

Michal Oleszak

References

Liu et al. (2016), "Forecasting with Dynamic Panel Data Models", PIER Working Paper No. 16022., https://papers.ssrn.com/sol3/Papers.cfm?abstract_id=2889000

Oleszak, M. (2018). "Forecasting sales with micro-panels: Empirical Bayes approach. Evidence from consumer goods sector.", Erasmus University Thesis Repository

Examples

1
2
3
data(EmplUK, package = "plm")
EmplUK <- dplyr::filter(EmplUK, year %in% c(1978, 1979, 1980, 1981, 1982))
pmpp_model <- pmpp(dep_var = "emp", data = EmplUK)

pmpp documentation built on Oct. 30, 2019, 11:35 a.m.