Hello, everyone, I am currently struggling with my HW for econometrics. Our task is to built forward-looking model using GMM (generalized method of moments). I have chosen for analysis the consumtion based asset pricing model. But I have problems with testing autocorrelation and instruments (weakness etc). When I want to test autoccorelelation using Ljung-Box test - the result is just error
E.G. this is my code:
Euler.gmm2 <- gmm(g = Euler, x = z,
t0 = startv,
wmatrix = "optimal", vcov = "HAC")
And when I want to test the autoccrelation using this code:
Box.test(Euler.gmm2$residuals, lag=1, type = "Lj")
I have this error: Error in ts(x) : 'ts' object must have one or more observations
Thx for your help.