tvPLM {tvReg} | R Documentation |
Time-Varying Coefficients Panel Data Models
Description
Fits a balanced panel data model using the Time-Varying Pooled Ordinary Least Squares, the Time-Varying Random Effects and the Time-Varying Fixed Effects models.
Usage
tvPLM(
formula,
z = NULL,
ez = NULL,
data,
index = NULL,
bw = NULL,
bw.cov = NULL,
cv.block = 0,
method = c("pooling", "random", "within"),
est = c("lc", "ll"),
tkernel = c("Triweight", "Epa", "Gaussian"),
control = tvreg.control(...),
...
)
Arguments
formula |
An object of class formula. |
z |
A vector containing the smoothing variable. |
ez |
(optional) A scalar or vector with the smoothing values. If
values are not included then the vector |
data |
An optional data frame or matrix. |
index |
Indicates the individual and time indexes. |
bw |
An opcional scalar. It represents the bandwidth in the estimation of trend coefficients. If NULL, it is selected by cross validation. |
bw.cov |
An optional scalar. It represents the bandwidth in the "lc" nonparametric estimation of the
time-varying covariance matrix. If NULL, it is selected by cross validation for method |
cv.block |
A positive scalar with the size of the block in leave one block out cross-validation. By default 'cv.block=0' meaning leave one out cross-validation. |
method |
A character with the choice of panel model/estimation method:
If |
est |
The nonparametric estimation method, one of "lc" (default) for linear constant |
tkernel |
A character, either "Triweight" (default), "Epa" or "Gaussian" kernel function. |
control |
list of control parameters. The default is constructed by
the function |
... |
Other parameters passed to specific methods. |
Details
This function wraps up the kernel smoothing time-varying coefficient pooled, random effects and fixed effects estimators.
Bandwidth selection is of great importance in kernel smoothing methodologies and it is done automatically by cross-validation.
A panel data model consists of "neq" elements in the cross-sectional dimention and "obs" number of time observations for each cross-section. All variables are the same for each equation which have common coefficients.
Value
tvPLM
returns a list of the class tvplm
containing the results of model, results of the estimation
and confidence instervals if chosen.
The object of class tvplm
have the following components:
coefficients |
An array of dimension obs x nvar x neq (obs = number of observations, nvar = number of variables in each equation, neq = number of equations in the system) with the time-varying coefficients estimates. |
Lower |
If |
Upper |
If |
fitted |
The fitted values. |
residuals |
Estimation residuals. |
x |
A list with the regressors data. |
y |
A matrix with the dependent variable data. |
z |
A vector with the smoothing variable. |
ez |
A vector with the smoothing estimation values. |
alpha |
A vector with the individual fixed effects, if chosen. |
bw |
Bandwidth of mean estimation. |
totobs |
Integer specifying the total number of observations. |
neq |
Integer specifying the number of cross-section observations. |
obs |
Integer specifying the number of time observations per cross-section. |
nvar |
Number of variables. |
method |
Estimation method. |
est |
Nonparemtric estimation methodology. |
tkernel |
Kernel type. |
level |
Confidence interval range. |
runs |
Number of bootstrap replications. |
tboot |
Type of bootstrap. |
BOOT |
List with all bootstrap replications of |
formula |
Initial formula. |
call |
Matched call. |
References
Casas, I., Gao, J., Peng, B. and Xie, S. (2021). Time-Varying Income Elasticities of Healthcare Expenditure for the OECD and Eurozone. Journal of Applied Econometrics, 36, pp. 328-345.
Sun, Y., Carrol, R.J and Li, D. (2009). Semiparametric Estimation of Fixed-Effects Panel Data Varying Coefficient Models. Advances in Econometrics, 25, pp. 101-129.
See Also
bw
, confint
, plot
,
print
and summary
Examples
data(OECD)
##TVPOLS estimation of the model
tvpols <- tvPLM(lhe~lgdp+pop65+pop14+public, index = c("country", "year"),
data = OECD, method ="pooling", bw = 0.3)
## Not run:
tvfe <- tvPLM(lhe~lgdp+pop65+pop14+public, index = c("country", "year"),
data = OECD, method ="within", bw = 0.8)
tvre <- tvPLM(lhe~lgdp+pop65+pop14+public, index = c("country", "year"),
data = OECD, method ="random", bw = 0.3)
## End(Not run)