| Library: | metrics |
| See also: | summarize |
| Macro: | panlag | |
| Description: | Computes the lag of the variable |
| Usage: | {zlag}=panlag(z,a, {T}) | |
| Input: | ||
| z Dataset | NT x {2+} + k Matrix | |
| T Number of time periods for a BALANCED Dataset | scalar a Konstante für y(i,t)=(1-a)*z(i,t)+a*z(i,t-1) scalar | |
| Output: | ||
| zlag Output matrix with (Ti-1)*N Observations | string | |
z=read("dynpanel.dat") ; read data set
it=z[,1:2] ; Matrix of indices
z0=panlag(it~z[,4],0) ; truncate first observation
z1=panlag(it~z[,4],1) ; lag of second variable
itlag=z0[,1:2] ; new indices
dz2=z0[,3]-z1[,3] ; differences of the second var.
| Library: | metrics |
| See also: | summarize |