Questions tagged [generalized-method-of-moments]
13 questions
2
votes
1 answer
Matrix multiplication error using gmm package
I am trying to follow the example given in Section 3.2 of this paper on the use of the gmm R package. So I wish to estimate the parameters of a stable distribution. I am using the following…

Victor Maxwell
- 306
- 1
- 12
1
vote
0 answers
How to view each one method to print the output values?
#from scipy.spatial.distance import euclidean
import numpy as np
import scipy
import scipy.signal
def matrix_from_csv_file(file_path):
"""
Returns the data matrix given the path of a CSV file.
Parameters:
file_path (str):…

Dhivya Bharkavi
- 35
- 4
1
vote
0 answers
How to add dummy interactions using pgmm
I am trying to add a dummy variable in order to determine the coefficients for a specific factor (MUNICIPIO) usin pgmm() in R.
This is the code:
GN_Municipal_Empresa <- pgmm(log(CANTIDAD_M3+1) ~…

Miguel Gutierrez
- 159
- 2
- 8
1
vote
0 answers
Arellano and Bond (1991) GMM estimation in R by using plm package
I am a last-year student at university, currently working on my Bachelor's (so still learning R), and I really hope that you would suggest a potential solution (even if to use Python).
So, the main model for my bachelor is as follows:
Main model for…

Wadim iLchuk
- 27
- 5
1
vote
0 answers
error on Variance inflation factor in gmm_rolling estimate
Following the code below, I am able to estimate a rolling gmm function.
gmm_list_IM <- lapply(1:(length(ALLX$IM)-24), function(i) {
tmp <- ALLX[i:(i+23),]
IM <- as.matrix(as.numeric(tmp$IM))
p <- nrow(IM)
rmrf_local <-…

Enrico Dace
- 115
- 10
0
votes
0 answers
Does calling a method of the different class using switch violate Single Responsibility Principle?
I have two classes (A and B) and a Model (T) with some properties. In A class, There is a method with the passing model(T). We have to check a condition to check the name using a switch case, where the name matches the case then we have to call a…

David_DD
- 585
- 1
- 5
- 12
0
votes
1 answer
Translating xtabond call from Stata to R
I am trying to replicate findings from a particular study. The study uses the xtabond command in Stata to run an Arellano-Bond estimator with lags of the dependent variables. The goal of the study is to estimate the effects of being in year X of a 4…

eric andre the gian
- 31
- 3
0
votes
0 answers
Panel VAR estimation using GMM on panelvar
I've been trying to estimate a pVAR using GMM on R using the package panelvar. I'm estimating a dynamic panel VAR with two-step GMM using first-differences.
I have a balanced panel with 378 with a group variable (id) and a time variable (year). I…

Dorito0102
- 59
- 6
0
votes
0 answers
System GMM with R: issues with the multi-part formula for IVs and the sargan test results
I'm working on a panel dataset with N = 30 countries and T = 15 years. I'm using R and the plm package for my analysis.
Based on research by Blundell-Bond (1998) and Arellano-Bover (1995), I decided to use the System-GMM onestep model, with only…

UzbeKistaN
- 33
- 4
0
votes
0 answers
Stopped by zero step from line search - R stops optimization early
I am trying to minimize an objective function, J(θ), with respect to θ, a 19-dimensional parameter vector. J(θ) is a smooth nonlinear function so I have tried various gradient-based optimizers in R to find the solution. A consistent problem is that…

EB727
- 43
- 5
0
votes
1 answer
R Generalized Method Of Moments Regression Estimation With Instruments
I'm trying to train a regression model using the generalized method of moments in R. I have 3 endogenous regressors that are correlated with 6 things I know to be exogenous.
My outcome variable is y
I have 3 endogenous regressors: z1, z2, z1*z2
I…

DVL
- 354
- 3
- 9
0
votes
1 answer
sahi: How to use the escape char in javascript
In my app i will add row and update the fields next to it. eg. as below
1 User1namefield
2 User2namefield
for this first i need to identify label 1 and 2 and then i need to go and updated username field.
Below code will work -…

Anand Kakhandaki
- 27
- 4
0
votes
1 answer
How to run the pgmm command?
Please see a sample of my data, and my pgmm code, and let me know if I am using the correct syntax.
Y1 is my dependent variable, and X* with C* variables are my independent and control variables. I am trying to run the dynamic GMM model with 2 year…

Uğurcan Evci
- 9
- 1
- 3