| xtpcmg | R Documentation |
Estimates a polynomial cointegrating regression in a panel using either Group-Mean FM-OLS (Wagner & Reichold 2023) or Pooled FM-OLS (de Jong & Wagner 2022). Models the long-run relationship:
xtpcmg(
data,
y,
x,
panel_id,
time_id,
model = c("mg", "pmg"),
q = 2L,
controls = NULL,
trend = 1L,
kernel = "ba",
bw = "And91",
effects = "oneway",
corr_rob = FALSE
)
data |
A data frame in long format. |
y |
Character. Name of the dependent variable. |
x |
Character. Name of the polynomial (I(1)) regressor. |
panel_id |
Character. Name of the panel identifier variable. |
time_id |
Character. Name of the time variable. |
model |
Character. Estimator: |
q |
Integer. Polynomial degree: |
controls |
Character vector. Names of additional I(1) control
variables. Default is |
trend |
Integer. Deterministic trend type: |
kernel |
Character. HAC kernel: |
bw |
Character or numeric. Bandwidth for HAC estimation. |
effects |
Character. For Pooled FM-OLS: |
corr_rob |
Logical. For Group-Mean FM-OLS: if |
y_{it} = \alpha_i + \beta_1 x_{it} + \beta_2 x_{it}^2 [+ \beta_3 x_{it}^3]
[+ \gamma z_{it}] + u_{it}
where x_{it} and z_{it} are I(1) processes.
An object of class "xtpcmg" with elements:
coefficients (named numeric vector),
vcov (variance-covariance matrix),
se (standard errors),
tstat (t-statistics),
pvalue (two-sided p-values),
model (estimator type: mg or pmg),
q (polynomial degree),
N (number of panel units),
TT (number of time periods),
y (dependent variable name),
x (polynomial variable name),
tp (turning point estimate, quadratic models only),
tp_se (delta-method SE for turning point),
tp_lo and tp_hi (95% CI bounds),
ind_coef (individual FM-OLS estimates, MG model),
swamy_s and swamy_p (Swamy slope homogeneity test).
Andrews, D.W.K. (1991). Heteroskedasticity and autocorrelation consistent covariance matrix estimation. Econometrica, 59(3), 817–858. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.2307/2938229")}
de Jong, R.M. and Wagner, M. (2022). Panel cointegrating polynomial regressions. Annals of Applied Statistics, 16(1), 416–442. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1214/21-AOAS1536")}
Wagner, M. and Reichold, K. (2023). Panel cointegrating polynomial regressions. Econometric Reviews, 42(9–10), 782–827. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1080/07474938.2023.2178141")}
dat <- grunfeld_cmg()
# Group-Mean FM-OLS (quadratic EKC-type model)
res <- xtpcmg(dat, y = "invest", x = "mvalue",
panel_id = "firm", time_id = "year",
model = "mg", q = 2L)
print(res)
summary(res)
# Pooled FM-OLS
res2 <- xtpcmg(dat, y = "invest", x = "mvalue",
panel_id = "firm", time_id = "year",
model = "pmg", q = 2L)
print(res2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.