Learn R Programming

DPTM (version 3.0.2)

DPML: Dynamic panel model with fixed effects.

Description

Use a MLE procedure to estimate the dynamic panel model with fixed effects.

Usage

DPML(formula, data, index=NULL, timeFE = FALSE, y1 = NULL,...)

## S6 method for class 'DPTM' #print(...)

Value

DPML returns an object of class "DPTM". The function print are used to obtain and print a print of the results. An object of class "DPTM" is a list containing at least the following components:

coefficients

a named vector of coefficients

NNLL

the negative log-likelihood function value

Zvalues

a vector of t statistics

Ses

a vector of standard errors

covariance_matrix

a covariance matrix

Th

the number of thresholds

thresholds

a named vector of thresholds

Arguments

formula

formula of the covariates with threshold effects.

data

data frame of the observed data.

index

variable names of individuals and period; If a setting is not provided, defaults (the first variables in data will be as "id", while the second will be "year") will be used. Defaults to `NULL`.

timeFE

logicals. If TRUE the time fixed effects will be allowed. Defaults to `FALSE`.

y1

lags of dependent variables; If a setting is not provided, defaults (the first-order lag) will be used. Defaults to `NULL`.

...

additional arguments, seestats::nlm.

Author

Hujie Bai

Details

DPML can fit the dynamic panel model with fixed effects proposed by Hsiao et al. (2002), which is based on the first difference and the maximum likelihood (MLE) method.

For a classical dynamic panel model with fixed effects having following form: $$y_{it}=\rho y_{it-1}+\beta_1x_{1,it}+\beta_2x_{2,it}+\alpha_i+u_{it}$$, can use y~x1+x2.

For a special dynamic panel model with fixed effects having the following form: $$\Delta y_{it}=\rho y_{it-1}+\beta_1x_{1,it}+\beta_2x_{2,it}+\alpha_i+u_{it}$$, can use dy~x1+x2 with y1\(= y_{it-1}\).

We assume the exogenous regressor \(x\) is weakly exogenous, and thus the first period after difference is given by $$\Delta y_{i1}=\delta_0 + {\boldsymbol\delta}'_1 \Delta {\bf x}_{i1}+ v_{i1},$$ where \(E(v_{i1}| \Delta {\bf x}_{i1} )=0\). \(E(v_{i1}^2)=\sigma^2_v\), \(E(v_{i1}\Delta u_{i2})=-\sigma^2_u\) and \(E(v_{i1} \Delta u_{it})=0\) for \(t=3,4,...,T\) and \(i=1,...,N\). For more details, see Hsiao et al. (2002).

In addition, we solve the log-likelihood function by stats::nlm who uses iterlim to set the maximum number of iterations, and thus iterlim is allowed by ... in DPML.

References

Hsiao, C., Pesaran, M. H., & Tahmiscioglu, A. K. (2002). Maximum likelihood estimation of fixed effects dynamic panel data models covering short time periods. Journal of econometrics, 109(1), 107-150.

Examples

Run this code
data(d1)

# No time fixed effects
model1 <- DPML(y~x+z, data = d1)
print(model1)

# With time fixed effects
model2 <- DPML(y~x+z, data = d1, timeFE = TRUE)
print(model2)

Run the code above in your browser using DataLab