I am a student, currently working on my Bachelor's Thesis. And as the next deadline approaches, I hope someone could give me a hand on my constant issue:
I need to estimate the next model with GMM estimator:
The authors of this model stated that the "estimator uses first differences of the observation equation (here is (10)) with the lagged dependent variable in levels as instruments fo the differenced equation".
So far I was using pgmm function in plm package. You can check other topics of mine with the issues I have faced, and I still did not solve them.
Hence, I tried to move to another package pdynmc authored by Dr. Markus Fritsch.
Here is a part of my dataset filtered with firms having at least 5 years of observations: https://drive.google.com/file/d/1dFUgXp8e1K0CdqMTpbtfviDq9vgJNOxW/view?usp=sharing
I am not sure you can get a context of it, but I need to estimate similar to this model as:
A change or growth in the dependent variable from t to t+1 (ΔTFPt+1) = GMM instruments, as far as I understood, of the, lagged dependent variable (so lagged change in the dependent variable) (ΔTFPt, and ΔTFPt-1) + change in one other variable (ΔDebt), the measure of needed variable (financial friction) + interaction between last 2 variables (financial friction * ΔDebt) + control variables (firm age, firm size or log(TA), change in sales or ΔSales).
In my dataset, needed variables are:
- ID - is an ID of the companies
- Year - the year of observation
- ta - log of total assets
- ff1-5 - financial friction variable of the companies
- LVomegaACF_A - is a TFP measure
- domegaACF_A - is ΔTFP measure
- ddebt - ΔDebt variable
- dsales - ΔSales variable
- Age - age of the companies
I tried to use the package as follows:
model <- pdynmc(dat = LVcheck, varname.i = "ID", varname.t = "Year",
varname.y = "domegaACF_A", lagTerms.y = 2,
fur.con = FALSE, varname.reg.fur = c("ddebt", "ff1", "Age", "ta", "dsales"),
lagTerms.reg.fur = c(1,1,1,1,1),
fur.con.diff = TRUE, fur.con.lev = FALSE,
include.dum = TRUE, dum.diff = TRUE, dum.lev = FALSE, varname.dum = "Year",
w.mat = "iid.err", std.err = "corrected", estimation = "onestep", opt.meth = "none",
use.mc.nonlin = FALSE, use.mc.diff = TRUE, use.mc.lev = FALSE, include.y = TRUE)
And the error I receive:
Error in pdynmc(dat = LVData_A, varname.i = "ID", varname.t = "Year", :
Insufficient number of time periods to derive linear moment conditions.
The question is the following, why the number of periods is insufficient if the only firms are displayed that have at least 5 years of observations?
And also, is my code written accordingly to my model specification, and all the arguments needed are written correctly.
Here is the package description https://rdrr.io/cran/pdynmc/man/pdynmc.html
Despite the fact, everything is quite detailed there, I still do not understand what is wrong with what I am doing.
question from:
https://stackoverflow.com/questions/65927712/pdynmc-package-in-r-gmm-issue