1. Please read the posting guide. Statistical questions and questions on
non-standard (not shipped with standard R distro) packages are largely off
topic here.
2. This CRAN task view might be of interest to you:
https://cran.r-project.org/web/views/Econometrics.html
3. But as a general comment, perhaps completely useless, singularity in
linear-type model fits are often due to overfitting. Have no idea what that
might mean in your context.
Bert Gunter
"The trouble with having an open mind is that people keep coming along and
sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
On Fri, Jan 22, 2021 at 1:08 PM Wadim iLchuk <vadikilchuk01 at gmail.com>
wrote:
> Hello everyone, My name is Vadym, I am a last-year student at Stockholm
> School of Economics in Riga, currently working on my Bachelor's Thesis
(so
> still learning R). For my research, I need a GMM estimator (preferable
> Arellano and Bond, 1991). I have been searching for a solution to my issue
> for about 2 months already, yet still, no solutions have been found.
>
> The data set could be found here:
>
>
https://drive.google.com/file/d/1uMmZTBDCaq1YoKO8KXU1L8EiqcKVe5V3/view?usp=sharing
> Dataset is firm-level data.
>
> The main model for my topic is:
> deltaTFPt+1 = lag(deltaTFPt) + deltadebtt + finfrictiont +
> deltadebt*finfriction + age + ta + deltasales.
>
> Where, deltaTFP - growth in productivity of the firm from t to t+1,
> deltadebt - growth in debt of the company, finfriction is my main variable
> of interest - namely financial friction for the company, age is the age of
> the company, ta is total assets, deltasales - growth in sales.
>
> I need to estimate coefficients by using GMM
>
> My code is the following for doing so by using pgmm function:
> ###############
> PLVData_A <- pdata.frame(LVData_A, index =
c("ID","Year")) z1 <-
> pgmm(domegaACF_A ~ lag(domegaACF_A, 1) + ddebt + ff1 + ff1:ddebt + Age + ta
> + dsales | lag(domegaACF_A, 2), data = PLVData_A, effect =
"twoways", model
> = "onestep", transformation = "d")
> summary(z1, robust = TRUE)
> #################
>
> Bearing in mind that I have been struggling with this for 2-3
> months already I have tried to change everything I could in the model, but
> constantly receive these types of errors:
>
> Error in solve.default(crossprod(WX, t(crossprod(WX, A1)))) :
> Lapack routine dgesv: system is exactly singular: U[5,5] = 0
> In addition: Warning message:
> In pgmm(domegaACF_A ~ lag(domegaACF_A, 1) + lag(ddebt, 0:1) + ff1 + :
> the first-step matrix is singular, a general inverse is used
>
>
> Error in solve.default(crossprod(WX, t(crossprod(WX, A1)))) :
> system is computationally singular: reciprocal condition number >
4.26304e-27
> In addition: Warning message:
> In pgmm(domegaACF_A ~ lag(domegaACF_A, 1) + lag(ddebt, 0:1) + ff1 + :
> the first-step matrix is singular, a general inverse is used
>
>
> Error in cbind(yX1[[i]], V1) :
> number of rows of matrices must match (see arg 2)
>
>
> Error in cbind(W2[[i]], V2) :
> number of rows of matrices must match (see arg 2)
> In addition: There were 50 or more warnings (use warnings() to see the
> first 50)
>
>
> I would really appreciate any of your support or ideas since I have no clue
> of how to solve the issue. Thank you in advance!
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
[[alternative HTML version deleted]]